LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mrt_001.h File Reference
#include "sys_config.h"
#include "cmsis.h"

Go to the source code of this file.

Data Structures

struct  IP_MRT_001_T
 MRT register block structure. More...
 

Macros

#define IP_MRT_001_INTVAL_IVALUE   (0xFFFFFF)
 MRT register bit fields & masks.
 
#define IP_MRT_001_INTVAL_LOAD   (1 << 31)
 
#define IP_MRT_001_CTRL_MODE_REPEAT   (0x00)
 
#define IP_MRT_001_CTRL_MODE_ONESHOT   (0x01)
 
#define IP_MRT_001_CTRL_INTEN_MASK   (0x01)
 
#define IP_MRT_001_CTRL_MODE_POS   (0x01)
 
#define IP_MRT_001_CTRL_MODE_MASK   (0x06)
 
#define IP_MRT_001_CTRL_MODE_SHIFT(x)   (x << 1)
 
#define IP_MRT_001_STAT_INTFLAG   (0x01)
 
#define IP_MRT_001_STAT_RUNNING   (0x02)
 

Enumerations

enum  IP_MRT_001_MODE_T { MRT_MODE_REPEAT = 0, MRT_MODE_ONESHOT = 1 }
 MRT Interrupt Modes enum. More...
 

Functions

STATIC INLINE void IP_MRT_Init (void)
 Initializes the MRT.
 
STATIC INLINE void IP_MRT_DeInit (void)
 De-initializes the MRT Channel.
 
STATIC INLINE uint32_t IP_MRT_GetInterval (IP_MRT_001_T *pMRT)
 Returns the timer time interval value.
 
STATIC INLINE void IP_MRT_SetInterval (IP_MRT_001_T *pMRT, uint32_t interval)
 Sets the timer time interval value.
 
STATIC INLINE uint32_t IP_MRT_GetTimer (IP_MRT_001_T *pMRT)
 Returns the current timer value.
 
STATIC INLINE bool IP_MRT_GetEnabled (IP_MRT_001_T *pMRT)
 Returns true if the timer is enabled.
 
STATIC INLINE void IP_MRT_SetEnabled (IP_MRT_001_T *pMRT)
 Enables the timer.
 
STATIC INLINE IP_MRT_001_MODE_T IP_MRT_GetMode (IP_MRT_001_T *pMRT)
 Returns the timer mode (repeat or one-shot).
 
STATIC INLINE void IP_MRT_SetMode (IP_MRT_001_T *pMRT, IP_MRT_001_MODE_T mode)
 Sets the timer mode to be repeat or one-shot.
 
STATIC INLINE bool IP_MRT_IsRepeatMode (IP_MRT_001_T *pMRT)
 Returns true if the timer is configured in repeat mode.
 
STATIC INLINE bool IP_MRT_IsOneShotMode (IP_MRT_001_T *pMRT)
 Returns true if the timer is configured in one-shot mode.
 
STATIC INLINE bool IP_MRT_IntPending (IP_MRT_001_T *pMRT)
 Returns true if the timer has an interrupt pending.
 
STATIC INLINE void IP_MRT_IntClear (IP_MRT_001_T *pMRT)
 Clears the pending interrupt (if any).
 
STATIC INLINE bool IP_MRT_Running (IP_MRT_001_T *pMRT)
 Returns true if the timer is running.