LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ATIMER example

Macros

#define PresetCount   (CRYSTAL_32K_FREQ_IN / 32)
 

Functions

static void ATIMER_ClearInts (void)
 
void EVRT_IRQHandler (void)
 Handle interrupt from ATIMER source.
 
int main (void)
 main routine for ATIMER example
 

Detailed Description

This example shows how to use Alarm Timer to generate interrupt.

The ATIMER is configured for a 1s period. On each expiration of the ATIMER, an ATIMER interrupt is generated and cleared. The background loop will toggle an LED at the ATIMER interrupt rate and sleep while it's doing nothing.

No special setup is required for the demo. Just build and run.

Build procedure: LPCOpen 18xx/43xx build instructions

Supported boards and board setup:

Submit bug reports for LPCOpen code here.

Macro Definition Documentation

#define PresetCount   (CRYSTAL_32K_FREQ_IN / 32)

Definition at line 60 of file atimer.c.

Function Documentation

static void ATIMER_ClearInts ( void  )
static

Definition at line 71 of file atimer.c.

void EVRT_IRQHandler ( void  )

Handle interrupt from ATIMER source.

Returns
Nothing

Definition at line 88 of file atimer.c.

int main ( void  )

main routine for ATIMER example

Returns
Nothing (function should not exit)

Definition at line 100 of file atimer.c.