rfLPC
A low level library for using NXP's LPC17xx SoC. Config is given for MBED prototyping board
|
This timer provide a simple mean to get a repetitive interrupt. More...
Functions | |
static void | rflpc_rit_enable () |
Enables the RIT. More... | |
static uint32_t | rflpc_rit_get_counter_value () |
Gets the current value of the rit counter. | |
static void | rflpc_rit_set_counter_value (uint32_t value) |
Sets the current value of the rit counter. | |
static void | rflpc_rit_clear_pending_interrupt () |
clears the pending interrupt. More... | |
void | rflpc_rit_set_callback (uint32_t comp_value, uint32_t mask, int reset_on_match, rflpc_irq_handler_t c) |
sets the RIT interrupt callback and configure the RIT interrupt. More... | |
This timer provide a simple mean to get a repetitive interrupt.
When the timer is started, it is incremented at each CPU clock tick and can be configured to generate an interruption when its counter matches a value/mask pair
|
inlinestatic |
|
inlinestatic |
void rflpc_rit_set_callback | ( | uint32_t | comp_value, |
uint32_t | mask, | ||
int | reset_on_match, | ||
rflpc_irq_handler_t | c | ||
) |
sets the RIT interrupt callback and configure the RIT interrupt.
The interrupt handler will be called when the counter value reaches value for the bits zeroed in the mask If reset on match is true, then when the counter match the comp_value, the counter is reset to 0
For example, if you want the timer to be called each time the 7th bit is equal to one: