HAL Generic Sensor Interface.
More...
HAL Generic Sensor Interface.
#define _base_sensor_methods_alone |
Value: \
size_t (*get_channels_number)(void *instance); \
msg_t (*read_raw)(
void *instance, int32_t axes[]); \
msg_t (*read_cooked)(
void *instance,
float axes[]);
int32_t msg_t
Type of a message.
BaseSensor specific methods.
Definition at line 47 of file hal_sensors.h.
#define _base_sensor_methods |
Value:#define _base_sensor_methods_alone
BaseSensor specific methods.
BaseSensor specific methods with inherited ones.
Definition at line 58 of file hal_sensors.h.
#define _base_sensor_data |
#define sensorGetChannelNumber |
( |
|
ip | ) |
(ip)->vmt->get_channels_number(ip) |
Sensors get channels number.
- Parameters
-
- Returns
- The number of channels of the BaseSensor
- Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.
Definition at line 106 of file hal_sensors.h.
#define sensorReadRaw |
( |
|
ip, |
|
|
|
dp |
|
) |
| (ip)->vmt->read_raw(ip, dp) |
Sensors read raw data.
- Parameters
-
[in] | ip | pointer to a BaseSensor or derived class. |
[in] | dp | pointer to a data array. |
- Returns
- The operation status.
- Return values
-
MSG_OK | if the function succeeded. |
MSG_RESET | if one or more errors occurred. |
- Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.
Definition at line 120 of file hal_sensors.h.
#define sensorReadCooked |
( |
|
ip, |
|
|
|
dp |
|
) |
| (ip)->vmt->read_cooked(ip, dp) |
Sensors read cooked data.
- Parameters
-
[in] | ip | pointer to a BaseSensor or derived class. |
[in] | dp | pointer to a data array. |
- Returns
- The operation status.
- Return values
-
MSG_OK | if the function succeeded. |
MSG_RESET | if one or more errors occurred. |
- Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.
Definition at line 134 of file hal_sensors.h.