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.
|
Header file for MeshX RTOS Timer interface. Provides APIs for creating, starting, stopping, deleting, and managing RTOS timers in the MeshX framework. More...
Go to the source code of this file.
Data Structures | |
struct | meshx_rtos_timer |
Typedefs | |
typedef void(* | meshx_rtos_timer_callback_t) (void *) |
typedef struct meshx_rtos_timer | meshx_rtos_timer_t |
Functions | |
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. | |
meshx_err_t | meshx_rtos_timer_start (meshx_rtos_timer_t *timer) |
Starts the RTOS timer. | |
meshx_err_t | meshx_rtos_timer_stop (meshx_rtos_timer_t *timer) |
Stops the RTOS timer. | |
meshx_err_t | meshx_rtos_timer_delete (meshx_rtos_timer_t *timer) |
Deletes the RTOS timer. | |
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. | |
void | meshx_os_timer_fire_cb (const void *timer_handle) |
Header file for MeshX RTOS Timer interface. Provides APIs for creating, starting, stopping, deleting, and managing RTOS timers in the MeshX framework.
Copyright (c) 2024 - 2025 MeshX
This module abstracts the RTOS timer functionalities and provides a unified interface for timer management, including support for auto-reload timers, callback functions, and dynamic period changes.
Definition in file meshx_rtos_timer.h.
typedef void(* meshx_rtos_timer_callback_t) (void *) |
Definition at line 24 of file meshx_rtos_timer.h.
typedef struct meshx_rtos_timer meshx_rtos_timer_t |
void meshx_os_timer_fire_cb | ( | const void * | timer_handle | ) |
Definition at line 148 of file meshx_os_timer.c.
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.
This function changes the period of an active or dormant RTOS timer.
[in] | timer | Pointer to the meshx_rtos_timer_t structure. |
[in] | new_period_ms | New timer period in milliseconds. |
Definition at line 154 of file meshx_timer.c.
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.
This function initializes and creates a new RTOS timer with the specified parameters.
[out] | timer | Pointer to the meshx_rtos_timer_t structure to be initialized. |
[in] | name | Timer Name String |
[in] | cb | Callback function to be invoked when the timer expires. |
[in] | arg | Argument to be passed to the callback function. |
[in] | period_ms | Timer period in milliseconds. |
[in] | reload | Flag set if timer is a auto reload type. |
Definition at line 46 of file meshx_timer.c.
meshx_err_t meshx_rtos_timer_delete | ( | meshx_rtos_timer_t * | timer | ) |
Deletes the RTOS timer.
This function deletes the RTOS timer and frees associated resources.
[in] | timer | Pointer to the meshx_rtos_timer_t structure. |
Definition at line 129 of file meshx_timer.c.
meshx_err_t meshx_rtos_timer_reset | ( | meshx_rtos_timer_t * | timer | ) |
Resets the RTOS timer.
This function resets the RTOS timer, causing it to restart from its beginning.
[in] | timer | Pointer to the meshx_rtos_timer_t structure. |
Definition at line 178 of file meshx_timer.c.
meshx_err_t meshx_rtos_timer_start | ( | meshx_rtos_timer_t * | timer | ) |
Starts the RTOS timer.
This function starts the RTOS timer.
[in] | timer | Pointer to the meshx_rtos_timer_t structure. |
Definition at line 83 of file meshx_timer.c.
meshx_err_t meshx_rtos_timer_stop | ( | meshx_rtos_timer_t * | timer | ) |
Stops the RTOS timer.
This function stops the RTOS timer.
[in] | timer | Pointer to the meshx_rtos_timer_t structure. |
Definition at line 106 of file meshx_timer.c.