LoRa-BLE-Sensor
|
This is a library to schedule sensor readings and radio transmissions. More...
Go to the source code of this file.
Classes | |
struct | sensor_scheduling_cfg_t |
Structure for the sensor scheduling configuration, each sensor and radio will have a schedule. More... | |
Enumerations | |
enum | sensor_scheduling_id { SENSOR_SCHEDULING_ID_SENSOR1 , SENSOR_SCHEDULING_ID_SENSOR2 , SENSOR_SCHEDULING_ID_RADIO , SENSOR_SCHEDULING_ID_LIMIT } |
Enum for the sensor scheduling id. This is used to identify the sensor or radio to schedule. | |
Functions | |
int | sensor_scheduling_init (const struct device *timer) |
Initialize the sensor scheduling module. | |
int | sensor_scheduling_add_schedule (sensor_scheduling_cfg_t *schedule) |
Add a schedule to the sensor scheduling module. | |
int | sensor_scheduling_remove_schedule (sensor_scheduling_cfg_t *schedule) |
Remove a schedule from the sensor scheduling module. | |
int | sensor_scheduling_reset_schedule (sensor_scheduling_cfg_t *schedule) |
Reset a schedule in the sensor scheduling module. This will set the alarm to trigger at the given frequency from the last event time. Triggering the next event based on the last event time keeps the schedule from drifting. | |
int | sensor_scheduling_get_seconds (void) |
Get the current time in seconds since the scheduling module was initialized. | |
This is a library to schedule sensor readings and radio transmissions.
int sensor_scheduling_add_schedule | ( | sensor_scheduling_cfg_t * | schedule | ) |
Add a schedule to the sensor scheduling module.
schedule | The schedule to add |
int sensor_scheduling_get_seconds | ( | void | ) |
Get the current time in seconds since the scheduling module was initialized.
int sensor_scheduling_init | ( | const struct device * | timer | ) |
Initialize the sensor scheduling module.
timer | The timer device to use for scheduling |
int sensor_scheduling_remove_schedule | ( | sensor_scheduling_cfg_t * | schedule | ) |
Remove a schedule from the sensor scheduling module.
schedule | The schedule to remove |
int sensor_scheduling_reset_schedule | ( | sensor_scheduling_cfg_t * | schedule | ) |
Reset a schedule in the sensor scheduling module. This will set the alarm to trigger at the given frequency from the last event time. Triggering the next event based on the last event time keeps the schedule from drifting.
schedule | The schedule to reset |