LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mrt_8xx.h File Reference

Go to the source code of this file.

Data Structures

struct  LPC_MRT_T
 MRT register block structure. More...
 

Macros

#define LPC_8XX_MRT_CHANNELS   (4)
 LPC8xx MRT chip configuration.
 
#define LPC_MRT_NO_IDLE_CHANNEL   (0x40)
 
#define LPC_MRT_CH0   ((IP_MRT_001_T *) &LPC_MRT->CHANNEL[0])
 
#define LPC_MRT_CH1   ((IP_MRT_001_T *) &LPC_MRT->CHANNEL[1])
 
#define LPC_MRT_CH2   ((IP_MRT_001_T *) &LPC_MRT->CHANNEL[2])
 
#define LPC_MRT_CH3   ((IP_MRT_001_T *) &LPC_MRT->CHANNEL[3])
 
#define MRT0_INTFLAG   (1)
 
#define MRT1_INTFLAG   (2)
 
#define MRT2_INTFLAG   (4)
 
#define MRT3_INTFLAG   (8)
 

Typedefs

typedef IP_MRT_001_T LPC_MRT_CHANNEL_T
 
typedef IP_MRT_001_MODE_T LPC_MRT_MODE_T
 

Functions

STATIC INLINE void Chip_MRT_Init (void)
 Initializes the MRT.
 
STATIC INLINE void Chip_MRT_DeInit (void)
 De-initializes the MRT Channel.
 
STATIC INLINE uint32_t Chip_MRT_GetInterval (LPC_MRT_CHANNEL_T *pMRT)
 Returns the timer time interval value.
 
STATIC INLINE void Chip_MRT_SetInterval (LPC_MRT_CHANNEL_T *pMRT, uint32_t interval)
 Sets the timer time interval value.
 
STATIC INLINE uint32_t Chip_MRT_GetTimer (LPC_MRT_CHANNEL_T *pMRT)
 Returns the current timer value.
 
STATIC INLINE bool Chip_MRT_GetEnabled (LPC_MRT_CHANNEL_T *pMRT)
 Returns true if the timer is enabled.
 
STATIC INLINE void Chip_MRT_SetEnabled (LPC_MRT_CHANNEL_T *pMRT)
 Enables the timer.
 
STATIC INLINE LPC_MRT_MODE_T Chip_MRT_GetMode (LPC_MRT_CHANNEL_T *pMRT)
 Returns the timer mode (repeat or one-shot)
 
STATIC INLINE void Chip_MRT_SetMode (LPC_MRT_CHANNEL_T *pMRT, LPC_MRT_MODE_T mode)
 Sets the timer mode (repeat or one-shot)
 
STATIC INLINE bool Chip_MRT_IsRepeatMode (LPC_MRT_CHANNEL_T *pMRT)
 Check if the timer is configured in repeat mode.
 
STATIC INLINE bool Chip_MRT_IsOneShotMode (LPC_MRT_CHANNEL_T *pMRT)
 Check if the timer is configured in one-shot mode.
 
STATIC INLINE bool Chip_MRT_IntPending (LPC_MRT_CHANNEL_T *pMRT)
 Check if the timer has an interrupt pending.
 
STATIC INLINE void Chip_MRT_IntClear (LPC_MRT_CHANNEL_T *pMRT)
 Clears the pending interrupt (if any)
 
STATIC INLINE bool Chip_MRT_Running (LPC_MRT_CHANNEL_T *pMRT)
 Check if the timer is running.
 
STATIC INLINE uint8_t Chip_MRT_GetIdleChannel (void)
 Returns the IDLE channel value.
 
STATIC INLINE uint32_t Chip_MRT_GetIntPending (void)
 Returns the channel number of IRQ pending channel.