Skip to content

Struct daisy::TimerHandle::Config

ClassList > daisy > TimerHandle > Config

Configuration struct for the Peripheral. More...

  • #include <tim.h>

Public Types

Type Name
enum CounterDir
Direction of the auto-reload counter.
enum Peripheral
Hardware Timer to configure, and use.

Public Attributes

Type Name
CounterDir dir
bool enable_irq
uint32_t period
period in ticks at TIM frequency that counter will reset based on dir
Peripheral periph

Public Functions

Type Name
Config ()

Detailed Description

Note:

These settings are used during initialization and changing them afterwards may not have the desired effect.

Public Types Documentation

enum CounterDir

Direction of the auto-reload counter.

enum daisy::TimerHandle::Config::CounterDir {
    UP = 0,
    DOWN
};

Todo

Add support for the various versions of Up/Down counters.


enum Peripheral

Hardware Timer to configure, and use.

enum daisy::TimerHandle::Config::Peripheral {
    TIM_2 = 0,
    TIM_3,
    TIM_4,
    TIM_5
};


Public Attributes Documentation

variable dir

CounterDir daisy::TimerHandle::Config::dir;

Counter direction


variable enable_irq

bool daisy::TimerHandle::Config::enable_irq;

Enable interrupt for user based callback


variable period

period in ticks at TIM frequency that counter will reset based on dir

uint32_t daisy::TimerHandle::Config::period;

Note:

TIM3 and TIM4 are both 16-bit timers. So the period maximum is 0xffff.


variable periph

Peripheral daisy::TimerHandle::Config::periph;

Hardware Peripheral


Public Functions Documentation

function Config

inline daisy::TimerHandle::Config::Config () 


The documentation for this class was generated from the following file external-docs/libDaisy/src/per/tim.h