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
- Host: GitHub
- URL: https://github.com/myfreax/esp32-timer
- Owner: myfreax
- Created: 2023-04-12T01:43:28.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-11T01:17:37.000Z (over 1 year ago)
- Last Synced: 2024-05-31T15:48:48.829Z (11 months ago)
- Language: C
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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