Go to the source code of this file.
Functions | |
| _PRIVATE void | set_match_reg (LPC_TIM_TypeDef *const timer, const TIMER_MatchRegister match_reg) |
| _PRIVATE void | unset_match_reg (LPC_TIM_TypeDef *const timer, const TIMER_MatchRegister match_reg) |
| _PRIVATE void | clear_match_regs (LPC_TIM_TypeDef *const timer) |
| 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. | |
| void | TIMER_Reset (TIMER timer) |
| Resets a TIMER peripheral without deconfiguring it. | |
| u32 | TIMER_ReadValue (TIMER timer) |
| Reads the current value of a TIMER peripheral. | |
| _PRIVATE void clear_match_regs | ( | LPC_TIM_TypeDef *const | timer | ) |
| _PRIVATE void set_match_reg | ( | LPC_TIM_TypeDef *const | timer, |
| const TIMER_MatchRegister | match_reg | ||
| ) |
| 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_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.
| 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.
| _PRIVATE void unset_match_reg | ( | LPC_TIM_TypeDef *const | timer, |
| const TIMER_MatchRegister | match_reg | ||
| ) |