An open API service indexing awesome lists of open source software.

https://github.com/myfreax/esp32-timer

ESP32 timer component, It has javascript-like syntax
https://github.com/myfreax/esp32-timer

Last synced: 2 months ago
JSON representation

ESP32 timer component, It has javascript-like syntax

Awesome Lists containing this project

README

        

# ESP32 Timer Component
General Software Timer

## Usage
```
git submodule add [email protected]:myfreax/esp32-timer.git components/timer
```
```c
#include "timer.h"

esp_timer_handle_t handle;

void callback(void* arg) {
esp_timer_handle_t* timer = arg;
ESP_ERROR_CHECK(esp_timer_delete(*timer));
}

ESP_ERROR_CHECK(
set_timeout("once", callback, &handle, &handle, time_us));

ESP_ERROR_CHECK(
set_interval("repeat_times", callback, &handle, &handle, time_us));
```
## Example
The [ESP32 Example Project](https://github.com/myfreax/esp32-example-project) demonstrates how to use IDF framework build application of reusable component