SingingCat 0
application
sensor.h
1#ifndef SENSOR_H
2#define SENSOR_H 1
3#include <main-header.h>
4#include "sensors/sensor_dev.h"
5
6// #include "bare-metal.h"
7
8
9int sensor_update_config(const long nodeid, int idx, const int readmillis, const int submitsec, const int max_values);
10void sensor_activation(struct sensorruntime *sr, int activation);
11int sensor_loop();
12void sensors_init();
13uint8_t sensors_inited(); // return 0 if not otherwise != 0
14void sensors_off();
15void sensors_newstyle();
16void sensor_info();
17struct sensorruntime *get_runtime(int idx);
18void sensor_run_str(const char *str);
19int all_sensors_probed(); // returns true if all sensors were probed (read) at least once
20int sensor_submit_request(const long nodeid, int idx, const int readmillis, const int submitsec, const int max_values);
24struct sensordev *sensor_register(struct sensordev *sensor);
25void sensor_deregister(struct sensordev *sensor);
33#define SENSOR_CONFIG_FLAG_IRQ 0
34
35#endif
void sensors_init()
initialize sensors, runtime, config, powerup each sensor in turn etc..
Definition: sensor.c:382
void sensors_off()
disable sensors
Definition: sensor.c:629
int sensor_loop()
called periodically. this will either query sensors when they are due or will set the isdue flag for ...
Definition: sensor.c:845
void sensors_newstyle()
enable new-style sensors (and disable old)
Definition: sensor.c:621
struct sensordev * sensor_register(struct sensordev *sensor)
register a new sensor. returns 0 if ok
Definition: sensor.c:644
runtime data per sensor (in-ram)
Definition: sensor_dev.h:33