MeshX 0.3
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
Loading...
Searching...
No Matches
meshx_rtos_timer.h
Go to the documentation of this file.
1
16
17#ifndef __MESHX_RTOS_TIMER_H
18#define __MESHX_RTOS_TIMER_H
19
20#include <stdint.h>
21#include <stdbool.h>
22#include "meshx_err.h"
23
24typedef void (*meshx_rtos_timer_callback_t)(void *);
25
26typedef struct meshx_rtos_timer
27{
28 /* Public */
29 void *timer_arg;
31 uint32_t timer_period;
32 const char *timer_name;
34 /* Private */
37
53meshx_err_t meshx_rtos_timer_create(meshx_rtos_timer_t *timer, const char * name, meshx_rtos_timer_callback_t cb, void *arg, uint32_t period_ms, bool reload);
65
77
89
102
114
115/*
116 * @brief Callback function for the OS timer to control task.
117 * @note This function is called internally not to be called by user.
118 *
119 * This function is called whenever a OS timer timeout occurs.
120 *
121 * @param timer_handle Timer haandle callback param
122 */
123void meshx_os_timer_fire_cb(const void* timer_handle);
124
125#endif /* __MESHX_RTOS_TIMER_H */
MeshX Error Codes.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
meshx_err_t meshx_rtos_timer_stop(meshx_rtos_timer_t *timer)
Stops the RTOS timer.
struct meshx_rtos_timer meshx_rtos_timer_t
meshx_err_t meshx_rtos_timer_start(meshx_rtos_timer_t *timer)
Starts the RTOS timer.
Definition meshx_timer.c:83
meshx_err_t meshx_rtos_timer_delete(meshx_rtos_timer_t *timer)
Deletes the RTOS timer.
void(* meshx_rtos_timer_callback_t)(void *)
void meshx_os_timer_fire_cb(const void *timer_handle)
meshx_err_t meshx_rtos_timer_change_period(meshx_rtos_timer_t *timer, uint32_t new_period_ms)
Changes the period of the RTOS timer.
meshx_err_t meshx_rtos_timer_reset(meshx_rtos_timer_t *timer)
Resets the RTOS timer.
meshx_err_t meshx_rtos_timer_create(meshx_rtos_timer_t *timer, const char *name, meshx_rtos_timer_callback_t cb, void *arg, uint32_t period_ms, bool reload)
Creates a new RTOS timer.
Definition meshx_timer.c:46
meshx_rtos_timer_callback_t timer_cb
const char * timer_name