|
PebbleOS v4.48.0-75-g7416f78a1
|
A client of a sensor. More...
#include <sensing.h>
Data Fields | |
| const struct pbl_sensor * | sensor |
| Sensor. | |
| enum pbl_sensor_type | type |
| Type of the frames to read. | |
| uint32_t | scale |
| Multiplier of the SI unit the frames are read in, a power of ten up to 10^9. | |
| uint32_t | frequency_mhz |
| Sampling frequency in millihertz, 0 for no frames. | |
| uint16_t | batch |
Frames per update at frequency_mhz, bounding how long frames may queue in the sensor. | |
| uint8_t | events |
| Events wanted, a bit per enum pbl_sensor_event_type. | |
| bool(* | notify )(struct pbl_sensing_client *client) |
| Optional. | |
| void(* | event )(struct pbl_sensing_client *client, const struct pbl_sensor_event *event) |
| Optional. | |
| void * | user_data |
| Free for the client's use. | |
A client of a sensor.
| uint16_t pbl_sensing_client::batch |
Frames per update at frequency_mhz, bounding how long frames may queue in the sensor.
0 discards the frames, while the sensor still samples at frequency_mhz. Change with pbl_sensing_client_set_batch().
| void(* pbl_sensing_client::event) (struct pbl_sensing_client *client, const struct pbl_sensor_event *event) |
Optional.
Called on each wanted event, in the device frame.
| uint8_t pbl_sensing_client::events |
Events wanted, a bit per enum pbl_sensor_event_type.
Change with pbl_sensing_client_set_events().
| uint32_t pbl_sensing_client::frequency_mhz |
Sampling frequency in millihertz, 0 for no frames.
Change with pbl_sensing_client_set_frequency().
| bool(* pbl_sensing_client::notify) (struct pbl_sensing_client *client) |
Optional.
Called when the armed number of frames are waiting, with the client disarmed. Returns true if the frames were handed over, false to stay armed and be called again on the next batch.
| uint32_t pbl_sensing_client::scale |
Multiplier of the SI unit the frames are read in, a power of ten up to 10^9.
| const struct pbl_sensor* pbl_sensing_client::sensor |
Sensor.
| enum pbl_sensor_type pbl_sensing_client::type |
Type of the frames to read.
| void* pbl_sensing_client::user_data |
Free for the client's use.