//#pragma once
|
|
#ifndef TIMER_SETUP_H
|
|
#define TIMER_SETUP_H
|
|
|
|
#include <stdint.h>
|
|
#include <FreeRTOS.h>
|
|
#include <freertos/semphr.h>
|
|
#include <esp32-hal-timer.h>
|
|
|
|
extern hw_timer_t * timer;
|
|
extern volatile SemaphoreHandle_t timerSemaphore;
|
|
extern portMUX_TYPE timerMux;
|
|
extern volatile uint32_t isrCounter;
|
|
extern volatile uint32_t lastIsrAt;
|
|
|
|
void IRAM_ATTR onTimer();
|
|
void setupTimer();
|
|
|
|
#endif
|