|
| const struct pbl_sensor * | pbl_sensor_next (const struct pbl_sensor *prev) |
| | Iterate over the sensors.
|
| |
| bool | pbl_sensor_is_ready (const struct pbl_sensor *sensor) |
| | Check whether a sensor is ready to be used.
|
| |
| const char * | pbl_sensor_get_name (const struct pbl_sensor *sensor) |
| | Get the name of a sensor.
|
| |
| static uint8_t | pbl_sensor_num_values (struct pbl_sensor_chan_spec spec) |
| | Get the number of values of a channel: 3 for a whole vector, 1 otherwise.
|
| |
| bool | pbl_sensor_has_type (const struct pbl_sensor *sensor, enum pbl_sensor_type type) |
| | Check whether a sensor measures a type.
|
| |
| const struct pbl_sensor_chan * | pbl_sensor_get_chans (const struct pbl_sensor *sensor, uint8_t *num) |
| | Get the channels of a sensor.
|
| |
| bool | pbl_sensor_has_event (const struct pbl_sensor *sensor, enum pbl_sensor_event_type type) |
| | Check whether a sensor detects an event.
|
| |
| uint16_t | pbl_sensor_num_frames (const struct pbl_sensor_batch *batch, enum pbl_sensor_type type) |
| | Get the number of frames of a batch holding the channels of a type.
|
| |
| uint64_t | pbl_sensor_frame_time (const struct pbl_sensor_batch *batch, enum pbl_sensor_type type, uint16_t i) |
| | Get the time of a frame of a batch.
|
| |
| int | pbl_sensor_read (const struct pbl_sensor *sensor, struct pbl_sensor_chan_spec spec, uint32_t scale, int32_t *val, uint64_t *timestamp_us) |
| | Read the latest values of a channel.
|
| |
| int | pbl_sensor_attr_set (const struct pbl_sensor *sensor, enum pbl_sensor_type type, enum pbl_sensor_attr attr, int32_t *val) |
| | Set an attribute.
|
| |
| int | pbl_sensor_attr_get (const struct pbl_sensor *sensor, enum pbl_sensor_type type, enum pbl_sensor_attr attr, int32_t *val) |
| | Get an attribute.
|
| |
| int | pbl_sensor_attr_get_avail (const struct pbl_sensor *sensor, enum pbl_sensor_type type, enum pbl_sensor_attr attr, struct pbl_sensor_attr_avail *avail) |
| | Get the values an attribute takes.
|
| |
| int | pbl_sensor_set_listener (const struct pbl_sensor *sensor, const struct pbl_sensor_listener *listener) |
| | Set the listener of batches and events.
|
| |
| int | pbl_sensor_flush (const struct pbl_sensor *sensor) |
| | Report the frames the sensor has queued, without waiting for the report latency.
|
| |
| int | pbl_sensor_set_event (const struct pbl_sensor *sensor, enum pbl_sensor_event_type type, bool on) |
| | Enable or disable the detection of an event.
|
| |
| int | pbl_sensor_event_attr_set (const struct pbl_sensor *sensor, enum pbl_sensor_event_type type, enum pbl_sensor_event_attr attr, int32_t *val) |
| | Set an event attribute.
|
| |
| int | pbl_sensor_event_attr_get (const struct pbl_sensor *sensor, enum pbl_sensor_event_type type, enum pbl_sensor_event_attr attr, int32_t *val) |
| | Get an event attribute.
|
| |
| bool | pbl_sensor_get_event (const struct pbl_sensor *sensor, enum pbl_sensor_event_type type) |
| | Check whether the detection of an event is enabled.
|
| |
| int | pbl_sensor_decode (const struct pbl_sensor *sensor, const struct pbl_sensor_batch *batch, struct pbl_sensor_chan_spec spec, uint32_t scale, uint16_t first, uint16_t count, int32_t *out) |
| | Decode a channel from frames of a batch, in SI units and the device frame.
|
| |
| int | pbl_sensor_decode_raw (const struct pbl_sensor_batch *batch, struct pbl_sensor_chan_spec spec, uint16_t first, uint16_t count, int32_t *out) |
| | Decode the raw values of a channel from frames of a batch, in the sensor frame.
|
| |
| int | pbl_sensor_convert (const struct pbl_sensor_batch *batch, struct pbl_sensor_chan_spec spec, uint32_t scale, uint16_t count, const int32_t *raw, int32_t *out) |
| | Convert raw values from pbl_sensor_decode_raw() to SI units, in the sensor frame.
|
| |
| void | pbl_sensor_get_mount_matrix (const struct pbl_sensor *sensor, int8_t matrix[3][3]) |
| | Get the mount matrix of a sensor.
|
| |
| void | pbl_sensor_mount_apply (const struct pbl_sensor *sensor, uint16_t count, int32_t *xyz) |
| | Move vectors from the sensor frame to the device frame, with the mount matrix.
|
| |
| void | pbl_sensor_hold (const struct pbl_sensor *sensor, const struct pbl_sensor_batch *batch) |
| | Keep the buffer of a batch past the listener call.
|
| |
| void | pbl_sensor_release (const struct pbl_sensor *sensor, const struct pbl_sensor_batch *batch) |
| | Give back the buffer of a batch kept with pbl_sensor_hold().
|
| |
| static uint32_t | pbl_sensor_mhz_to_us (int32_t mhz) |
| | Convert a sampling frequency to the longest interval sampling at least that fast.
|
| |
| static int32_t | pbl_sensor_us_to_mhz (uint32_t us) |
| | Convert a sampling interval to a frequency, rounded to the nearest.
|
| |