Go to the source code of this file.
Functions | |
void | TIMER_Init (TIMER *timer, u8 which, u32 prescaler, u8 int_priority) |
Initializes a TIMER peripheral. | |
void | TIMER_Deinit (TIMER timer) |
Deconfigures a TIMER peripheral (also match registers). | |
void | TIMER_SetMatch (TIMER timer, TIMER_MatchRegister match_reg) |
Sets the match value for a match register of a TIMER peripheral. | |
void | TIMER_UnsetMatch (TIMER timer, TIMER_MatchRegister match_reg) |
Unsets a match register of a TIMER peripheral. | |
void | TIMER_Enable (TIMER timer) |
Enables a TIMER peripheral. | |
void | TIMER_Disable (TIMER timer) |
Disables a TIMER peripheral. | |
bool | TIMER_IsEnabled (TIMER timer) |
Checks if a TIMER peripheral is enabled. | |
u32 | TIMER_ReadValue (TIMER timer) |
Reads the current value of a TIMER peripheral. | |
void | TIMER_Reset (TIMER timer) |
Resets a TIMER peripheral without deconfiguring it. | |
void | TIMER_SetInterruptHandler (TIMER timer, u8 source, TIMER_InterruptHandler handler) |
Sets the interrupt handler for a TIMER peripheral, on a specific source between the 4 match registers and 2 capture channels (enum TIMER_InterruptSource). | |
void | TIMER_UnsetInterruptHandler (TIMER timer, u8 source) |
Unsets the interrupt handler for a TIMER peripheral, on a specific source between the 4 match registers and 2 capture channels (enum TIMER_InterruptSource). | |
void TIMER_Deinit | ( | TIMER | timer | ) |
Deconfigures a TIMER peripheral (also match registers).
Definition at line 124 of file timer.c.
void TIMER_Disable | ( | TIMER | timer | ) |
Disables a TIMER peripheral.
timer | TIMER peripheral |
void TIMER_Enable | ( | TIMER | timer | ) |
Enables a TIMER peripheral.
timer | TIMER peripheral |
Definition at line 203 of file timer.c.
Initializes a TIMER peripheral.
timer | [OUTPUT] Configured TIMER peripheral |
which | Which timer to initialize (0-3) |
prescaler | Prescaler value. If set to NO_PRESCALER, prescaler won't be used. |
int_priority | Timer interrupt priority (0 (highest), 15 (lowest)). If set to INT_PRIO_DEF, the default priority is set. |
Definition at line 62 of file timer.c.
bool TIMER_IsEnabled | ( | TIMER | timer | ) |
Reads the current value of a TIMER peripheral.
timer | TIMER peripheral |
Definition at line 285 of file timer.c.
void TIMER_Reset | ( | TIMER | timer | ) |
Resets a TIMER peripheral without deconfiguring it.
void TIMER_SetInterruptHandler | ( | TIMER | timer, |
u8 | source, | ||
TIMER_InterruptHandler | handler | ||
) |
Sets the interrupt handler for a TIMER peripheral, on a specific source between the 4 match registers and 2 capture channels (enum TIMER_InterruptSource).
timer | TIMER peripheral |
source | Interrupt source (enum TIMER_InterruptSource) |
handler | Function pointer to the interrupt handler: void function(void) |
Definition at line 60 of file timer_irq.c.
void TIMER_SetMatch | ( | TIMER | timer, |
TIMER_MatchRegister | match_reg | ||
) |
Sets the match value for a match register of a TIMER peripheral.
match_reg | Match register to set |
Definition at line 162 of file timer.c.
Unsets the interrupt handler for a TIMER peripheral, on a specific source between the 4 match registers and 2 capture channels (enum TIMER_InterruptSource).
timer | TIMER peripheral |
source | Interrupt source (enum TIMER_InterruptSource) |
Definition at line 65 of file timer_irq.c.
void TIMER_UnsetMatch | ( | TIMER | timer, |
TIMER_MatchRegister | match_reg | ||
) |
Unsets a match register of a TIMER peripheral.
match_reg | Match register to unset. This variable won't be touched. |
Definition at line 184 of file timer.c.