S32 SDK
ewm_hal.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include "device_registers.h"

Go to the source code of this file.

Enumerations

enum  ewm_in_assert_logic_t { EWM_IN_ASSERT_DISABLED = 0x00U, EWM_IN_ASSERT_ON_LOGIC_ZERO = 0x01U, EWM_IN_ASSERT_ON_LOGIC_ONE = 0x02U }
 EWM input pin configuration Configures if the input pin is enabled and when is asserted Implements : ewm_in_assert_logic_t_Class. More...
 

Functions

External Watchdog Module HAL
void EWM_HAL_Init (EWM_Type *const base, bool interruptEnable, ewm_in_assert_logic_t assertLogic, bool enable)
 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. More...
 
ewm_in_assert_logic_t EWM_HAL_GetInputPinAssertLogic (const EWM_Type *const base)
 Get the Input pin assert logic. More...
 
static void EWM_HAL_Refresh (EWM_Type *const base)
 Refresh EWM. This method needs to be called within the window period specified by the Compare Low and Compare High registers. More...
 
static bool EWM_HAL_IsInterruptEnabled (const EWM_Type *const base)
 Get the Interrupt Enable bit. More...
 
static bool EWM_HAL_IsEnabled (const EWM_Type *const base)
 Get the EWM enable bit. More...
 
static uint8_t EWM_HAL_GetControl (const EWM_Type *const base)
 Get the Control register Value. More...
 
static void EWM_HAL_SetCompareLow (EWM_Type *const base, uint8_t value)
 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. More...
 
static uint8_t EWM_HAL_GetCompareLow (const EWM_Type *const base)
 Get the Compare Low Value. More...
 
static void EWM_HAL_SetCompareHigh (EWM_Type *const base, uint8_t value)
 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. More...
 
static uint8_t EWM_HAL_GetCompareHigh (const EWM_Type *const base)
 Get the Compare High Value. More...
 
static void EWM_HAL_SetPrescaler (EWM_Type *const base, uint8_t value)
 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. More...
 
static uint8_t EWM_HAL_GetPrescaler (const EWM_Type *const base)
 Get the Clock Prescaler Value. More...