daisy::TimerHandle::Config¶
Configuration struct for the Peripheral. More...
#include <tim.h>
Public Types¶
Name | |
---|---|
enum class | Peripheral { TIM_2 = 0, TIM_3, TIM_4, TIM_5} Hardware Timer to configure, and use. |
enum class | CounterDir { UP = 0, DOWN} Direction of the auto-reload counter. |
Public Functions¶
Name | |
---|---|
Config() |
Public Attributes¶
Name | |
---|---|
Peripheral | periph |
CounterDir | dir |
uint32_t | period period in ticks at TIM frequency that counter will reset based on dir |
bool | enable_irq |
Detailed Description¶
Configuration struct for the Peripheral.
Note: These settings are used during initialization and changing them afterwards may not have the desired effect.
Public Types Documentation¶
enum Peripheral¶
Enumerator | Value | Description |
---|---|---|
TIM_2 | 0 | 32-bit counter |
TIM_3 | 16-bit counter | |
TIM_4 | 16-bit counter | |
TIM_5 | 32-bit counter |
Hardware Timer to configure, and use.
enum CounterDir¶
Enumerator | Value | Description |
---|---|---|
UP | 0 | |
DOWN |
Direction of the auto-reload counter.
Todo: Add support for the various
versions of Up/Down counters.
Public Functions Documentation¶
function Config¶
Public Attributes Documentation¶
variable periph¶
Hardware Peripheral
variable dir¶
Counter direction
variable period¶
period in ticks at TIM frequency that counter will reset based on dir
Note: TIM3 and TIM4 are both 16-bit timers. So the period maximum is 0xffff.
variable enable_irq¶
Enable interrupt for user based callback
Updated on 2024-01-03 at 19:41:00 +0000