12#ifndef SENSOR_SCHEDULING_H
13#define SENSOR_SCHEDULING_H
17#include <zephyr/kernel.h>
18#include <zephyr/device.h>
25 SENSOR_SCHEDULING_ID_SENSOR1,
26 SENSOR_SCHEDULING_ID_SENSOR2,
27 SENSOR_SCHEDULING_ID_RADIO,
28 SENSOR_SCHEDULING_ID_LIMIT,
38 uint32_t frequency_seconds;
44 uint32_t last_event_time;
46 uint8_t one_time_trigger;
int sensor_scheduling_init(const struct device *timer)
Initialize the sensor scheduling module.
Definition sensor_scheduling.c:91
int sensor_scheduling_get_seconds(void)
Get the current time in seconds since the scheduling module was initialized.
Definition sensor_scheduling.c:152
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 fre...
Definition sensor_scheduling.c:123
int sensor_scheduling_add_schedule(sensor_scheduling_cfg_t *schedule)
Add a schedule to the sensor scheduling module.
Definition sensor_scheduling.c:103
sensor_scheduling_id
Enum for the sensor scheduling id. This is used to identify the sensor or radio to schedule.
Definition sensor_scheduling.h:24
int sensor_scheduling_remove_schedule(sensor_scheduling_cfg_t *schedule)
Remove a schedule from the sensor scheduling module.
Definition sensor_scheduling.c:114
This is a library to keep track of sensor and radio timers. Manages alarms for sensors and radio tran...
Structure for the sensor scheduling configuration, each sensor and radio will have a schedule.
Definition sensor_scheduling.h:34