External Watchdog Monitor Hardware Abstraction Layer.
This HAL provides low-level access to all hardware features of the EWM.
EWM input pin configuration Configures if the input pin is enabled and when is asserted Implements : ewm_in_assert_logic_t_Class.
Enumerator |
---|
EWM_IN_ASSERT_DISABLED |
Input pin disabled
|
EWM_IN_ASSERT_ON_LOGIC_ZERO |
Input pin asserts EWM when on logic 0
|
EWM_IN_ASSERT_ON_LOGIC_ONE |
Input pin asserts EWM when on logic 1
|
Definition at line 43 of file ewm_hal.h.
static uint8_t EWM_HAL_GetCompareHigh |
( |
const EWM_Type *const |
base | ) |
|
|
inlinestatic |
Get the Compare High Value.
- Parameters
-
- Returns
- Value stored in Compare High register Implements : EWM_HAL_GetCompareHigh_Activity
Definition at line 186 of file ewm_hal.h.
static uint8_t EWM_HAL_GetCompareLow |
( |
const EWM_Type *const |
base | ) |
|
|
inlinestatic |
Get the Compare Low Value.
- Parameters
-
- Returns
- Value stored in Compare Low register Implements : EWM_HAL_GetCompareLow_Activity
Definition at line 161 of file ewm_hal.h.
static uint8_t EWM_HAL_GetControl |
( |
const EWM_Type *const |
base | ) |
|
|
inlinestatic |
Get the Control register Value.
- Parameters
-
- Returns
- Value stored in Control register Implements : EWM_HAL_GetControl_Activity
Definition at line 137 of file ewm_hal.h.
Get the Input pin assert logic.
- Parameters
-
- Returns
- The input pin assert logic:
- EWM_IN_ASSERT_DISABLED - EWM in disabled
- EWM_IN_ASSERT_ON_LOGIC_ZERO - EWM is asserted when EWM_in is logic 0
- EWM_IN_ASSERT_ON_LOGIC_ONE - EWM is asserted when EWM_in is logic 1
Definition at line 87 of file ewm_hal.c.
static uint8_t EWM_HAL_GetPrescaler |
( |
const EWM_Type *const |
base | ) |
|
|
inlinestatic |
Get the Clock Prescaler Value.
- Parameters
-
- Returns
- Value stored in Clock Prescaler register Implements : EWM_HAL_GetPrescaler_Activity
Definition at line 209 of file ewm_hal.h.
Init EWM. This method configures the EWM instance Control Register fields such as interrupt enable, input pin, instance enablement. The user must make sure that the prescaler, compare high and compare low registers are configured prior to this function call.
- Parameters
-
[in] | base | EWM base pointer |
[in] | interruptEnable | Enable or disable EWM interrupt |
[in] | assertLogic | Configure when the EWM input pin asserts |
[in] | enable | Enable or disable the EWM instance |
Definition at line 49 of file ewm_hal.c.
static bool EWM_HAL_IsEnabled |
( |
const EWM_Type *const |
base | ) |
|
|
inlinestatic |
Get the EWM enable bit.
- Parameters
-
- Returns
- The state of the device enable bit:
- false - EWM disabled
- true - EWM enabled Implements : EWM_HAL_IsEnabled_Activity
Definition at line 125 of file ewm_hal.h.
static bool EWM_HAL_IsInterruptEnabled |
( |
const EWM_Type *const |
base | ) |
|
|
inlinestatic |
Get the Interrupt Enable bit.
- Parameters
-
- Returns
- The state of the interrupt enable bit:
- false - interrupt disabled
- true - interrupt enabled Implements : EWM_HAL_IsInterruptEnabled_Activity
Definition at line 111 of file ewm_hal.h.
static void EWM_HAL_Refresh |
( |
EWM_Type *const |
base | ) |
|
|
inlinestatic |
Refresh EWM. This method needs to be called within the window period specified by the Compare Low and Compare High registers.
- Parameters
-
[in] | base | EWM base pointer Implements : EWM_HAL_Refresh_Activity |
Definition at line 95 of file ewm_hal.h.
static void EWM_HAL_SetCompareHigh |
( |
EWM_Type *const |
base, |
|
|
uint8_t |
value |
|
) |
| |
|
inlinestatic |
Set the Compare High Value. This register can be only written once after a CPU reset. The user must make sure that the Compare High is greater than Compare Low value Note: The maximum Compare High value is 0xFE.
- Parameters
-
[in] | base | EWM base pointer |
[in] | value | Value to write into Compare High register Implements : EWM_HAL_SetCompareHigh_Activity |
Definition at line 175 of file ewm_hal.h.
static void EWM_HAL_SetCompareLow |
( |
EWM_Type *const |
base, |
|
|
uint8_t |
value |
|
) |
| |
|
inlinestatic |
Set the Compare Low Value. This register can be only written once after a CPU reset. The user must make sure that the Compare High is greater than Compare Low value.
- Parameters
-
[in] | base | EWM base pointer |
[in] | value | Value to write into Compare Low register Implements : EWM_HAL_SetCompareLow_Activity |
Definition at line 150 of file ewm_hal.h.
static void EWM_HAL_SetPrescaler |
( |
EWM_Type *const |
base, |
|
|
uint8_t |
value |
|
) |
| |
|
inlinestatic |
Set the Clock Prescaler Value. This register can be only written once after a CPU reset and it must be written before enabling the EWM.
- Parameters
-
[in] | base | EWM base pointer |
[in] | value | Prescaler Value Implements : EWM_HAL_SetPrescaler_Activity |
Definition at line 198 of file ewm_hal.h.