2 * Configuration of module Pwm (Pwm_Cfg.h)
\r
4 * Created by: Arccore AB
\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 Wed Dec 01 16:24:11 CET 2010
\r
16 #if (PWM_SW_MAJOR_VERSION != 1)
17 #error "Pwm: Configuration file version differs from BSW version."
25 #define PWM_DEV_ERROR_DETECT STD_ON
\r
26 #define PWM_STATICALLY_CONFIGURED STD_OFF
\r
27 #define PWM_NOTIFICATION_SUPPORTED STD_OFF
\r
28 #define PWM_FREEZE_ENABLE STD_OFF
\r
30 // Define what API functions to enable.
\r
31 #define PWM_GET_OUTPUT_STATE STD_ON
\r
32 #define PWM_SET_PERIOD_AND_DUTY STD_ON
\r
33 #define PWM_DEINIT STD_OFF
\r
34 #define PWM_DUTYCYCLE STD_ON
\r
35 #define PWM_SET_OUTPUT_TO_IDLE STD_OFF
\r
36 #define PWM_VERSION_INFO_API STD_OFF
\r
41 * PWM132: Switch for enabling the update of duty cycle parameter at the end
\r
42 * of the current period.
\r
44 * Note: Currently only ON mode is supported.
\r
46 #define PWM_DUTYCYCLE_UPDATED_ENDPERIOD STD_ON
\r
49 * PWM106: This is implementation specific but not all values may be valid
\r
50 * within the type. This shall be chosen in order to have the most efficient
\r
51 * implementation on a specific microcontroller platform.
\r
53 * PWM106 => Pwm_ChannelType == channel id.
\r
55 typedef uint8 Pwm_ChannelType;
\r
58 * PWM070: All time units used within the API services of the PWM module shall
\r
59 * be of the unit ticks.
\r
61 typedef uint16 Pwm_PeriodType;
\r
63 /****************************************************************************
\r
64 * Enumeration of channels
\r
65 * Maps a symbolic name to a hardware channel
\r
70 PWM_NUMBER_OF_CHANNELS = 2
\r
71 } Pwm_NamedChannelsType;
\r
73 /* 1 =PWMchannel output is high at the beginning of the period, then goes low when the duty count
\r
75 #define POLARITY_NORMAL 1
\r
76 #define POLARITY_INVERSED 0
\r
79 * Since the AUTOSAR PWM specification uses a different unit for the duty,
\r
80 * the following macro can be used to convert between that format and the
\r
83 #define DUTY_AND_PERIOD(_duty,_period) .duty = (uint8)((uint32)((uint32)_duty*(uint32)_period)>>15), .period = _period
\r
87 /** Number of duty ticks */
\r
89 /** Length of period, in ticks */
\r
91 /** Center or left align */
\r
92 uint8_t centerAlign:1;
\r
93 /** Polarity of the channel */
\r
95 /** Scaled clock enabled */
\r
96 uint8_t scaledClockEnable:1;
\r
98 uint8_t idleState:1;
\r
100 uint8_t reserved:4;
\r
102 Pwm_ChannelClassType class;
\r
104 Pwm_ChannelType channel;
\r
105 } Pwm_ChannelConfigurationType;
\r
116 }Pwm_PrescalerType;
\r
119 Pwm_ChannelConfigurationType channels[PWM_NUMBER_OF_CHANNELS];
\r
120 Pwm_PrescalerType busPrescalerA;
\r
121 Pwm_PrescalerType busPrescalerB;
\r
122 uint8_t prescalerA;
\r
123 uint8_t prescalerB;
\r