LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IP: Self Wakeup Timer (WKT) register block and driver

Detailed Description

Self Wakeup Timer

Data Structures

struct  IP_WKT_001_T
 Self wake-up timer register block structure. More...
 

Macros

#define WKT_CTRL_CLKSEL   ((uint32_t) (1 << 0))
 
#define WKT_CTRL_ALARMFLAG   ((uint32_t) (1 << 1))
 
#define WKT_CTRL_CLEARCTR   ((uint32_t) (1 << 2))
 

Enumerations

enum  IP_WKT_CLKSRC_T { IP_WKT_CLKSRC_DIVIRC = 0, IP_WKT_CLKSRC_10KHZ = 1 }
 

Functions

STATIC INLINE void IP_WKT_ClearIntStatus (IP_WKT_001_T *pWKT)
 Clear WKT interrupt status.
 
STATIC INLINE void IP_WKT_Stop (IP_WKT_001_T *pWKT)
 Clear and stop WKT counter.
 
STATIC INLINE void IP_WKT_SetClockSource (IP_WKT_001_T *pWKT, IP_WKT_CLKSRC_T clkSrc)
 Set the WKT clock source.
 
STATIC INLINE void IP_WKT_Start (IP_WKT_001_T *pWKT, uint32_t cntVal)
 Set the WKT counter value & start the counter.
 

Macro Definition Documentation

#define WKT_CTRL_ALARMFLAG   ((uint32_t) (1 << 1))

Wake-up or alarm timer flag

Definition at line 61 of file wkt_001.h.

#define WKT_CTRL_CLEARCTR   ((uint32_t) (1 << 2))

Clears the self wake-up timer

Definition at line 62 of file wkt_001.h.

#define WKT_CTRL_CLKSEL   ((uint32_t) (1 << 0))

WKT Control register bit fields & masksSelect the self wake-up timer clock source

Definition at line 60 of file wkt_001.h.

Enumeration Type Documentation

WKT Clock source values enum

Enumerator:
IP_WKT_CLKSRC_DIVIRC 

Divided IRC clock - runs at 750kHz

IP_WKT_CLKSRC_10KHZ 

Low power clock - runs at 10kHz

Definition at line 67 of file wkt_001.h.

Function Documentation

STATIC INLINE void IP_WKT_ClearIntStatus ( IP_WKT_001_T pWKT)

Clear WKT interrupt status.

Parameters
pWKT: Pointer to WKT register block
Returns
Nothing

Definition at line 77 of file wkt_001.h.

STATIC INLINE void IP_WKT_SetClockSource ( IP_WKT_001_T pWKT,
IP_WKT_CLKSRC_T  clkSrc 
)

Set the WKT clock source.

Parameters
pWKT: Pointer to WKT register block
clkSrc: WKT Clock source(WKT_CLKSRC_10KHZ or WKT_CLKSRC_DIVIRC)
Returns
Nothing

Definition at line 100 of file wkt_001.h.

STATIC INLINE void IP_WKT_Start ( IP_WKT_001_T pWKT,
uint32_t  cntVal 
)

Set the WKT counter value & start the counter.

Parameters
pWKT: Pointer to WKT register block
cntVal: WKT Counter value
Returns
Nothing

Definition at line 116 of file wkt_001.h.

STATIC INLINE void IP_WKT_Stop ( IP_WKT_001_T pWKT)

Clear and stop WKT counter.

Parameters
pWKT: Pointer to WKT register block
Returns
Nothing

Definition at line 89 of file wkt_001.h.