Error Injection Module Peripheral Driver.
EIM PD provides a set of high-level APIs/services to configure the Error Injection Module (EIM) module.
Data Structures | |
struct | eim_user_channel_config_t |
EIM channel configuration structure. More... | |
Macros | |
#define | EIM_CHECKBITMASK_DEFAULT (0x01U) |
The value default of EIM check-bit mask. More... | |
#define | EIM_DATAMASK_DEFAULT (0x00U) |
The value default of EIM data mask. More... | |
EIM Driver API | |
void | EIM_DRV_Init (uint32_t instance, uint8_t channelCnt, const eim_user_channel_config_t *channelConfigArr) |
Initializes the EIM module. More... | |
void | EIM_DRV_Deinit (uint32_t instance) |
De-initializes the EIM module. More... | |
void | EIM_DRV_ConfigChannel (uint32_t instance, const eim_user_channel_config_t *userChannelConfig) |
Configures the EIM channel. More... | |
void | EIM_DRV_GetChannelConfig (uint32_t instance, uint8_t channel, eim_user_channel_config_t *channelConfig) |
Gets the EIM channel configuration. More... | |
void | EIM_DRV_GetDefaultConfig (uint8_t channel, eim_user_channel_config_t *channelConfig) |
Gets the EIM channel configuration default. More... | |
#define EIM_CHECKBITMASK_DEFAULT (0x01U) |
The value default of EIM check-bit mask.
Definition at line 48 of file eim_driver.h.
#define EIM_DATAMASK_DEFAULT (0x00U) |
The value default of EIM data mask.
Definition at line 50 of file eim_driver.h.
void EIM_DRV_ConfigChannel | ( | uint32_t | instance, |
const eim_user_channel_config_t * | userChannelConfig | ||
) |
Configures the EIM channel.
This function configures check-bit mask, data mask and operation status(enable/disable) for EIM channel. The EIM channel configuration structure shall be passed as arguments.
This is an example demonstrating how to define a EIM channel configuration structure:
[in] | instance | EIM module instance number |
[in] | userChannelConfig | Pointer to EIM channel configuration structure |
Definition at line 118 of file eim_driver.c.
void EIM_DRV_Deinit | ( | uint32_t | instance | ) |
De-initializes the EIM module.
This function sets all registers to reset value and disables EIM module. In order to use the EIM module again, EIM_DRV_Init must be called.
[in] | instance | EIM module instance number |
Definition at line 95 of file eim_driver.c.
void EIM_DRV_GetChannelConfig | ( | uint32_t | instance, |
uint8_t | channel, | ||
eim_user_channel_config_t * | channelConfig | ||
) |
Gets the EIM channel configuration.
This function gets check bit mask, data mask and operation status of EIM channel.
[in] | instance | EIM module instance number |
[in] | channel | EIM channel number |
[out] | channelConfig | Pointer to EIM channel configuration structure |
Definition at line 144 of file eim_driver.c.
void EIM_DRV_GetDefaultConfig | ( | uint8_t | channel, |
eim_user_channel_config_t * | channelConfig | ||
) |
Gets the EIM channel configuration default.
This function gets check bit mask, data mask and operation status default of EIM channel.
[in] | channel | EIM channel number |
[out] | channelConfig | Pointer to EIM channel configuration structure default |
Definition at line 171 of file eim_driver.c.
void EIM_DRV_Init | ( | uint32_t | instance, |
uint8_t | channelCnt, | ||
const eim_user_channel_config_t * | channelConfigArr | ||
) |
Initializes the EIM module.
This function configures for EIM channels. The EIM channel configuration structure array and number of configured channels shall be passed as arguments. This function should be called before calling any other EIM driver function.
This is an example demonstrating how to define a EIM channel configuration structure array:
[in] | instance | EIM module instance number. |
[in] | channelCnt | Number of configured channels |
[in] | channelConfigArr | EIM channel configuration structure array |
Definition at line 65 of file eim_driver.c.