This document consists of sections titled with Driver Overview, Data Structures, Enumerations, Functions, etc., each with an overview list and detailed documentation. It is recommended to read the Driver Overview first for it includes a comprehensive description of the peripheral, driver and driver changes. Other sections give detailed information for APIs, enums, macros, etc., for your further reference.
This structure is used to configure the EWM.
Enumerator |
---|
kEWM_EwmInZeroAssert |
EWM-in assert with low-voltage logic.
|
kEWM_EwmInOneAssert |
EWM-in assert with high-voltage logic.
|
void EWM_Init |
( |
EWM_Type * |
base, |
|
|
const ewm_config_t * |
psConfig |
|
) |
| |
This function is used to initialize the EWM. After calling, the EWM runs immediately according to the configuration.
- Note
- Except for the interrupt enable control bit, other control bits and registers are write once after a CPU reset. Modifying them more than once generates a bus transfer error.
This is an example.
* psConfig.compareHighValue = 0xAAU;
*
- Parameters
-
base | EWM peripheral base address |
psConfig | The configuration of the EWM |
void EWM_Deinit |
( |
EWM_Type * |
base | ) |
|
This function is used to shut down the EWM.
- Parameters
-
base | EWM peripheral base address |
This function initializes the EWM configuration structure to default values. The default values are as follows.
* ewmConfig->bEnableEWM = true;
* ewmConfig->bEnableEWMInput = false;
* ewmConfig->bEnableInterrupt = false;
* ewmConfig->u8ClockDivder = 0;
* ewmConfig->u8CompareLowValue = 0;
* ewmConfig->u8CompareHighValue = 0xFEU;
*
- Parameters
-
psConfig | Pointer to the EWM configuration structure. |
- See Also
- ewm_config_t
static void EWM_EnableInterrupt |
( |
EWM_Type * |
base | ) |
|
|
inlinestatic |
This function enables the EWM interrupt.
- Parameters
-
base | EWM peripheral base address |
static void EWM_DisableInterrupt |
( |
EWM_Type * |
base | ) |
|
|
inlinestatic |
This function disables the EWM interrupt.
- Parameters
-
base | EWM peripheral base address |
void EWM_Refresh |
( |
EWM_Type * |
base | ) |
|
This function resets the EWM counter to zero.
- Parameters
-
base | EWM peripheral base address |