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_os_timer.h
Go to the documentation of this file.
1
12
13#ifndef __OS_TIMER_H__
14#define __OS_TIMER_H__
15
16#include <stdint.h>
17#include "sys/queue.h"
18#include "meshx_control_task.h"
20
24#define OS_TIMER_SIZE sizeof(meshx_os_timer_t)
25
29#define OS_TMER_GET_TIMER_NAME(timer) (timer->timer_handle.timer_name)
30
39
55typedef void (*meshx_os_timer_cb_t)(const meshx_os_timer_t* p_timer);
56
73
82
101meshx_err_t meshx_os_timer_create(const char *name, uint32_t period, bool reload, meshx_os_timer_cb_t cb, meshx_os_timer_t **timer_handle);
102
113
124
135meshx_err_t meshx_os_timer_set_period(meshx_os_timer_t *timer_handle, const uint32_t period_ms);
136
147
158
159#endif /* __OS_TIMER_H__ */
Header file for the control task in the BLE mesh node application.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
meshx_err_t meshx_os_timer_start(const meshx_os_timer_t *timer_handle)
Start a timer.
struct meshx_os_timer meshx_os_timer_t
Alias for the meshx_os_timer structure.
meshx_err_t meshx_os_timer_init(void)
Initialize the OS timer module.
void(* meshx_os_timer_cb_t)(const meshx_os_timer_t *p_timer)
Timer callback function prototype.
meshx_err_t meshx_os_timer_create(const char *name, uint32_t period, bool reload, meshx_os_timer_cb_t cb, meshx_os_timer_t **timer_handle)
Create a timer.
meshx_err_t meshx_os_timer_restart(const meshx_os_timer_t *timer_handle)
Restart a timer.
meshx_err_t meshx_os_timer_set_period(meshx_os_timer_t *timer_handle, const uint32_t period_ms)
Set period on an initialised timer.
meshx_err_t meshx_os_timer_stop(const meshx_os_timer_t *timer_handle)
Stop a timer.
meshx_rtos_timer_t meshx_os_timer_handle_t
Alias for the meshx_rtos_timer_t type.
meshx_err_t meshx_os_timer_delete(meshx_os_timer_t **timer_handle)
Delete a timer.
Header file for MeshX RTOS Timer interface. Provides APIs for creating, starting, stopping,...
struct meshx_rtos_timer meshx_rtos_timer_t
Structure to hold parameters for the OS timer control task message.
meshx_os_timer_cb_t cb
meshx_os_timer_handle_t timer_handle
SLIST_ENTRY(meshx_os_timer) next