RTEMS 6.1-rc1
Data Structures | Enumerator | Variables
Ewm

Data Structures

struct  _ewm_config
 Describes EWM clock source. More...
 

Variables

bool _ewm_config::enableEwm
 
bool _ewm_config::enableEwmInput
 
bool _ewm_config::setInputAssertLogic
 
bool _ewm_config::enableInterrupt
 
uint8_t _ewm_config::compareLowValue
 
uint8_t _ewm_config::compareHighValue
 

Driver version

enum  _ewm_interrupt_enable_t { kEWM_InterruptEnable = EWM_CTRL_INTEN_MASK }
 EWM interrupt configuration structure with default settings all disabled. More...
 
enum  _ewm_status_flags_t { kEWM_RunningFlag = EWM_CTRL_EWMEN_MASK }
 EWM status flags. More...
 
typedef struct _ewm_config ewm_config_t
 Describes EWM clock source. More...
 
#define FSL_EWM_DRIVER_VERSION   (MAKE_VERSION(2, 0, 3))
 EWM driver version 2.0.3.
 

EWM initialization and de-initialization

void EWM_Init (EWM_Type *base, const ewm_config_t *config)
 Initializes the EWM peripheral. More...
 
void EWM_Deinit (EWM_Type *base)
 Deinitializes the EWM peripheral. More...
 
void EWM_GetDefaultConfig (ewm_config_t *config)
 Initializes the EWM configuration structure. More...
 

EWM functional Operation

void EWM_Refresh (EWM_Type *base)
 Services the EWM. More...
 

Detailed Description

Typedef Documentation

◆ ewm_config_t

typedef struct _ewm_config ewm_config_t

Describes EWM clock source.

Data structure for EWM configuration.

This structure is used to configure the EWM.

Enumeration Type Documentation

◆ _ewm_interrupt_enable_t

EWM interrupt configuration structure with default settings all disabled.

This structure contains the settings for all of EWM interrupt configurations.

Enumerator
kEWM_InterruptEnable 

Enable the EWM to generate an interrupt

◆ _ewm_status_flags_t

EWM status flags.

This structure contains the constants for the EWM status flags for use in the EWM functions.

Enumerator
kEWM_RunningFlag 

Running flag, set when EWM is enabled

Function Documentation

◆ EWM_Deinit()

void EWM_Deinit ( EWM_Type base)

Deinitializes the EWM peripheral.

This function is used to shut down the EWM.

Parameters
baseEWM peripheral base address

brief Deinitializes the EWM peripheral.

This function is used to shut down the EWM.

param base EWM peripheral base address

◆ EWM_GetDefaultConfig()

void EWM_GetDefaultConfig ( ewm_config_t config)

Initializes the EWM configuration structure.

This function initializes the EWM configuration structure to default values. The default values are as follows.

ewmConfig->enableEwm = true;
ewmConfig->enableEwmInput = false;
ewmConfig->setInputAssertLogic = false;
ewmConfig->enableInterrupt = false;
ewmConfig->ewm_lpo_clock_source_t = kEWM_LpoClockSource0;
ewmConfig->prescaler = 0;
ewmConfig->compareLowValue = 0;
ewmConfig->compareHighValue = 0xFEU;
Parameters
configPointer to the EWM configuration structure.
See also
ewm_config_t

brief Initializes the EWM configuration structure.

This function initializes the EWM configuration structure to default values. The default values are as follows. code ewmConfig->enableEwm = true; ewmConfig->enableEwmInput = false; ewmConfig->setInputAssertLogic = false; ewmConfig->enableInterrupt = false; ewmConfig->ewm_lpo_clock_source_t = kEWM_LpoClockSource0; ewmConfig->prescaler = 0; ewmConfig->compareLowValue = 0; ewmConfig->compareHighValue = 0xFEU; endcode

param config Pointer to the EWM configuration structure. see ewm_config_t

◆ EWM_Init()

void EWM_Init ( EWM_Type base,
const ewm_config_t config 
)

Initializes the EWM peripheral.

This function is used to initialize the EWM. After calling, the EWM runs immediately according to the configuration. Note that, 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.

config.compareHighValue = 0xAAU;
EWM_Init(ewm_base,&config);
void EWM_GetDefaultConfig(ewm_config_t *config)
Initializes the EWM configuration structure.
Definition: fsl_ewm.c:103
void EWM_Init(EWM_Type *base, const ewm_config_t *config)
Initializes the EWM peripheral.
Definition: fsl_ewm.c:39
Describes EWM clock source.
Definition: fsl_ewm.h:45
Definition: deflate.c:114
Parameters
baseEWM peripheral base address
configThe configuration of the EWM

brief Initializes the EWM peripheral.

This function is used to initialize the EWM. After calling, the EWM runs immediately according to the configuration. Note that, 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. code ewm_config_t config; EWM_GetDefaultConfig(&config); config.compareHighValue = 0xAAU; EWM_Init(ewm_base,&config); endcode

param base EWM peripheral base address param config The configuration of the EWM

◆ EWM_Refresh()

void EWM_Refresh ( EWM_Type base)

Services the EWM.

This function resets the EWM counter to zero.

Parameters
baseEWM peripheral base address

brief Services the EWM.

This function resets the EWM counter to zero.

param base EWM peripheral base address

Variable Documentation

◆ compareHighValue

uint8_t _ewm_config::compareHighValue

Compare high-register value

◆ compareLowValue

uint8_t _ewm_config::compareLowValue

Compare low-register value

◆ enableEwm

bool _ewm_config::enableEwm

Enable EWM module

◆ enableEwmInput

bool _ewm_config::enableEwmInput

Enable EWM_in input

◆ enableInterrupt

bool _ewm_config::enableInterrupt

Enable EWM interrupt

◆ setInputAssertLogic

bool _ewm_config::setInputAssertLogic

EWM_in signal assertion state