32 #include "ic_pal_cfg.h"
50 #if (defined(IC_PAL_OVER_EMIOS))
64 IC_BUS_SEL_INTERNAL = 0x06U
73 IC_CLOCK_DIVID_BY_1 = 0x00U,
74 IC_CLOCK_DIVID_BY_2 = 0x01U,
75 IC_CLOCK_DIVID_BY_3 = 0x02U,
76 IC_CLOCK_DIVID_BY_4 = 0x03U,
77 IC_CLOCK_DIVID_BY_5 = 0x04U,
78 IC_CLOCK_DIVID_BY_6 = 0x05U,
79 IC_CLOCK_DIVID_BY_7 = 0x06U,
80 IC_CLOCK_DIVID_BY_8 = 0x07U,
81 IC_CLOCK_DIVID_BY_9 = 0x08U,
82 IC_CLOCK_DIVID_BY_10 = 0x09U,
83 IC_CLOCK_DIVID_BY_11 = 0x0AU,
84 IC_CLOCK_DIVID_BY_12 = 0x0BU,
85 IC_CLOCK_DIVID_BY_13 = 0x0CU,
86 IC_CLOCK_DIVID_BY_14 = 0x0DU,
87 IC_CLOCK_DIVID_BY_15 = 0x0EU,
88 IC_CLOCK_DIVID_BY_16 = 0x0FU
92 #if (defined(IC_PAL_OVER_ETIMER))
102 IC_CLOCK_DIVID_1 = 0x18U,
103 IC_CLOCK_DIVID_2 = 0x19U,
104 IC_CLOCK_DIVID_4 = 0x1AU,
105 IC_CLOCK_DIVID_8 = 0x1BU,
106 IC_CLOCK_DIVID_16 = 0x1CU,
107 IC_CLOCK_DIVID_32 = 0x1DU,
108 IC_CLOCK_DIVID_64 = 0x1EU,
109 IC_CLOCK_DIVID_128 = 0x1FU,
110 } ic_source_prescaler_t;
157 #if (defined(IC_PAL_OVER_FTM))
166 bool continuousModeEn;
167 } channel_extension_ftm_for_ic_t;
180 } extension_ftm_for_ic_t;
183 #if (defined(IC_PAL_OVER_EMIOS))
192 ic_bus_select_t timebase;
193 ic_internal_ps_t prescaler;
194 } channel_extension_emios_for_ic_t;
205 bool enableGlobalPrescaler;
206 bool enableGlobalTimeBase;
207 } extension_emios_for_ic_t;
210 #if (defined(IC_PAL_OVER_ETIMER))
219 ic_source_prescaler_t prescaler;
220 bool continuousModeEn;
223 } channel_extension_etimer_for_ic_t;
237 uint8_t nNumChannels;
239 uint8_t channelConfigArray[IC_PAL_NUM_OF_CHANNEL_MAX];
240 bool enableContinuousMode[IC_PAL_NUM_OF_CHANNEL_MAX];
241 #if (defined(IC_PAL_OVER_EMIOS))
242 emios_bus_select_t timeBaseSelection[IC_PAL_NUM_OF_CHANNEL_MAX];
243 emios_input_filter_t filterInput[IC_PAL_NUM_OF_CHANNEL_MAX];
244 bool filterEn[IC_PAL_NUM_OF_CHANNEL_MAX];
246 #if (defined(IC_PAL_OVER_ETIMER))
247 uint16_t measurementResults[IC_PAL_NUM_OF_CHANNEL_MAX];
249 bool enableNotification[IC_PAL_NUM_OF_CHANNEL_MAX];
250 void * channelCallbackParams[IC_PAL_NUM_OF_CHANNEL_MAX];
259 #if defined(__cplusplus)
362 #if defined(__cplusplus)
Structure storing PAL instance information.
status_t IC_Init(const ic_instance_t *const instance, const ic_config_t *configPtr)
Initializes the input capture mode.
void IC_DisableNotification(const ic_instance_t *const instance, uint8_t channel)
Disable channel notifications.
void IC_EnableNotification(const ic_instance_t *const instance, uint8_t channel)
Enable channel notifications.
void IC_StopChannel(const ic_instance_t *const instance, uint8_t channel)
Stop the counter.
status_t IC_Deinit(const ic_instance_t *const instance)
De-initialize a input capture instance.
Defines the configuration structures are used in the input capture mode.
ftm_clock_ps_t
FlexTimer pre-scaler factor selection for the clock source. In quadrature decoder mode set FTM_CLOCK_...
status_t IC_SetChannelMode(const ic_instance_t *const instance, uint8_t channel, ic_option_mode_t channelMode)
Get the measured value.
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
void(* ic_callback_t)(ic_event_t event, void *userData)
ftm_clock_source_t
FlexTimer clock source selection.
The internal context structure.
ic_option_mode_t
The measurement type for input capture mode Implements : ic_option_mode_t_Class.
const ic_input_ch_param_t * inputChConfig
void IC_StartChannel(const ic_instance_t *const instance, uint8_t channel)
Start the counter.
uint16_t IC_GetMeasurement(const ic_instance_t *const instance, uint8_t channel)
Get the measured value.