Esp8266/Components/driver/include/driver/hw_timer.h File Reference
#include <esp_systemapi.h>
Include dependency graph for Esp8266/Components/driver/include/driver/hw_timer.h:
Go to the source code of this file.
Macros | |
#define | HW_TIMER_BASE_CLK APB_CLK_FREQ |
#define | MAX_HW_TIMER1_INTERVAL 0x7fffff |
Maximum timer interval in ticks. More... | |
#define | MIN_HW_TIMER1_INTERVAL_US 50U |
Minimum hardware interval in microseconds. More... | |
#define | FRC1_ENABLE_TIMER BIT7 |
#define | FRC1_AUTO_LOAD BIT6 |
#define | HW_TIMER2_CLKDIV TIMER_CLKDIV_256 |
#define | HW_TIMER2_CLK (HW_TIMER_BASE_CLK >> HW_TIMER2_CLKDIV) |
Typedefs | |
typedef void(* | hw_timer_callback_t) (void *arg) |
Enumerations | |
enum | hw_timer_clkdiv_t { TIMER_CLKDIV_1 = 0 , TIMER_CLKDIV_16 = 4 , TIMER_CLKDIV_256 = 8 , TIMER_CLKDIV_1 = 0 , TIMER_CLKDIV_16 = 4 , TIMER_CLKDIV_256 = 8 , TIMER_CLKDIV_1 , TIMER_CLKDIV_16 , TIMER_CLKDIV_256 } |
enum | hw_timer_intr_type_t { TIMER_EDGE_INT = 0 , TIMER_LEVEL_INT = 1 , TIMER_EDGE_INT = 0 , TIMER_LEVEL_INT = 1 , TIMER_EDGE_INT , TIMER_LEVEL_INT } |
enum | hw_timer_source_type_t { TIMER_FRC1_SOURCE = 0 , TIMER_NMI_SOURCE = 1 , TIMER_FRC1_SOURCE = 0 , TIMER_NMI_SOURCE = 1 , TIMER_FRC1_SOURCE , TIMER_NMI_SOURCE } |
Functions | |
void | hw_timer1_attach_interrupt (hw_timer_source_type_t source_type, hw_timer_callback_t callback, void *arg) |
Attach an interrupt for the timer. More... | |
void | hw_timer1_enable (hw_timer_clkdiv_t div, hw_timer_intr_type_t intr_type, bool auto_load) |
Enable the timer. More... | |
void | hw_timer1_write (uint32_t ticks) |
Set the timer interval. More... | |
void | hw_timer1_disable (void) |
Disable the timer. More... | |
void | hw_timer1_detach_interrupt (void) |
Detach interrupt from the timer. More... | |
uint32_t | hw_timer1_read (void) |
Get timer1 count. More... | |
static uint32_t | hw_timer2_read (void) |
Read current timer2 value. More... | |
void | hw_timer2_set_alarm (uint32_t ticks) |
Set timer2 alarm count value. More... | |
void | hw_timer_init (void) |
Initialise hardware timers. More... | |
Macro Definition Documentation
◆ FRC1_AUTO_LOAD
#define FRC1_AUTO_LOAD BIT6 |
◆ FRC1_ENABLE_TIMER
#define FRC1_ENABLE_TIMER BIT7 |
◆ HW_TIMER_BASE_CLK
#define HW_TIMER_BASE_CLK APB_CLK_FREQ |