2 * Configuration of module Pwm (Pwm_Cfg.h)
\r
5 * Configured for (MCU): HCS12
\r
7 * Module vendor: ArcCore
\r
8 * Module version: 2.0.1
\r
11 * Generated by Arctic Studio (http://arccore.com)
\r
12 * on Mon Nov 08 20:30:02 CET 2010
\r
16 #if (PWM_SW_MAJOR_VERSION != 1)
17 #error "Pwm: Configuration file version differs from BSW version."
23 #define PWM_DEV_EROR_DETECT STD_ON
\r
24 #define PWM_STATICALLY_CONFIGURED STD_OFF
\r
25 #define PWM_NOTIFICATION_SUPPORTED STD_OFF
\r
26 #define PWM_FREEZE_ENABLE STD_OFF
\r
28 // Define what API functions to enable.
\r
29 #define PWM_GET_OUTPUT_STATE STD_OFF
\r
30 #define PWM_SET_PERIOD_AND_DUTY ON
\r
31 #define PWM_DEINIT STD_OFF
\r
32 #define PWM_DUTYCYCLE ON
\r
33 #define PWM_SET_OUTPUT_TO_IDLE STD_OFF
\r
34 #define PWM_VERSION_INFO_API STD_OFF
\r
39 * PWM132: Switch for enabling the update of duty cycle parameter at the end
\r
40 * of the current period.
\r
42 * Note: Currently only ON mode is supported.
\r
44 #define PWM_DUTYCYCLE_UPDATED_ENDPERIOD STD_ON
\r
47 * PWM106: This is implementation specific but not all values may be valid
\r
48 * within the type. This shall be chosen in order to have the most efficient
\r
49 * implementation on a specific microcontroller platform.
\r
51 * PWM106 => Pwm_ChannelType == channel id.
\r
53 typedef uint8 Pwm_ChannelType;
\r
56 * PWM070: All time units used within the API services of the PWM module shall
\r
57 * be of the unit ticks.
\r
59 typedef uint16 Pwm_PeriodType;
\r
61 /* 1 =PWMchannel output is high at the beginning of the period, then goes low when the duty count
\r
63 #define POLARITY_NORMAL 1
\r
64 #define POLARITY_INVERSED 0
\r
67 * Since the AUTOSAR PWM specification uses a different unit for the duty,
\r
68 * the following macro can be used to convert between that format and the
\r
71 #define DUTY_AND_PERIOD(_duty,_period) .duty = (uint8)((uint32)((uint32)_duty*(uint32)_period)>>15), .period = _period
\r
75 /** Number of duty ticks */
\r
77 /** Length of period, in ticks */
\r
79 /** Center or left align */
\r
80 uint8_t centerAlign:1;
\r
81 /** Polarity of the channel */
\r
83 /** Scaled clock enabled */
\r
84 uint8_t scaledClockEnable:1;
\r
88 Pwm_ChannelType channel;
\r
89 } Pwm_ChannelConfigurationType;
\r
100 }Pwm_PrescalerType;
\r
103 Pwm_ChannelConfigurationType channels[PWM_NUMBER_OF_CHANNELS];
\r
104 Pwm_PrescalerType prescalerA;
\r
105 Pwm_PrescalerType prescalerB;
\r