Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
Hardware timer

Access Hardware timer. More...

Classes

class  HardwareTimer
 Hardware timer class. More...
 
class  Hardware_Timer
 

Macros

#define MAX_HW_TIMER_INTERVAL_US   0x7fffff
 Maximum timer interval in microseconds. More...
 
#define MIN_HW_TIMER_INTERVAL_US   0x32
 Minimum hardware interval in microseconds. More...
 

Enumerations

enum  HardwareTimerMode {
  eHWT_Maskable,
  eHWT_NonMaskable
}
 

Functions

uint32_t IRAM_ATTR usToTimerTicks (uint32_t us)
 Convert microseconds into timer ticks. More...
 
uint32_t IRAM_ATTR timerTicksToUs (uint32_t ticks)
 Convert timer ticks into microseconds. More...
 

Detailed Description

Access Hardware timer.

Macro Definition Documentation

#define MAX_HW_TIMER_INTERVAL_US   0x7fffff

Maximum timer interval in microseconds.

#define MIN_HW_TIMER_INTERVAL_US   0x32

Minimum hardware interval in microseconds.

Function Documentation

uint32_t IRAM_ATTR timerTicksToUs ( uint32_t  ticks)

Convert timer ticks into microseconds.

Note
accounts for current timer prescale setting
uint32_t IRAM_ATTR usToTimerTicks ( uint32_t  us)

Convert microseconds into timer ticks.

Note
Replaces the previous US_TO_RTC_TIMER_TICKS macro to guarantee we use the correct timer prescale value.