HAL Generic Compass Interface.
More...
HAL Generic Compass Interface.
#define _base_compass_methods_alone |
Value: msg_t (*set_bias)(
void *instance,
float biases[]); \
msg_t (*reset_bias)(
void *instance); \
msg_t (*set_sensitivity)(
void *instance,
float sensitivities[]); \
msg_t (*reset_sensitivity)(
void *instance);
int32_t msg_t
Type of a message.
BaseCompass specific methods.
Definition at line 49 of file hal_compass.h.
#define _base_compass_methods |
Value:#define _base_compass_methods_alone
BaseCompass specific methods.
BaseCompass specific methods with inherited ones.
Definition at line 63 of file hal_compass.h.
#define compassGetAxesNumber |
( |
|
ip | ) |
(ip)->vmt->get_channels_number(ip) |
Compass get axes number.
- Parameters
-
- Returns
- The number of axes of the BaseCompass
- Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.
Definition at line 107 of file hal_compass.h.
#define compassReadRaw |
( |
|
ip, |
|
|
|
dp |
|
) |
| (ip)->vmt->read_raw(ip, dp) |
Compass read raw data.
- Parameters
-
[in] | ip | pointer to a BaseCompass 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 122 of file hal_compass.h.
#define compassReadCooked |
( |
|
ip, |
|
|
|
dp |
|
) |
| (ip)->vmt->read_cooked(ip, dp) |
Compass read cooked data.
- Parameters
-
[in] | ip | pointer to a BaseCompass 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 137 of file hal_compass.h.
#define compassSetBias |
( |
|
ip, |
|
|
|
bp |
|
) |
| (ip)->vmt->set_bias(ip, bp) |
Updates compass bias data from received buffer.
- Note
- The bias buffer must have the same length of the the compass axes number.
- Parameters
-
[in] | ip | pointer to a BaseCompass class. |
[in] | bp | pointer to a buffer of bias values. |
- 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 154 of file hal_compass.h.
#define compassResetBias |
( |
|
ip | ) |
(ip)->vmt->reset_bias(ip) |
Reset compass bias data restoring it to zero.
- Parameters
-
- 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 168 of file hal_compass.h.
#define compassSetSensitivity |
( |
|
ip, |
|
|
|
sp |
|
) |
| (ip)->vmt->set_sensitivity(ip, sp) |
Updates compass sensitivity data from received buffer.
- Note
- The sensitivity buffer must have the same length of the the compass axes number.
- Parameters
-
[in] | ip | pointer to a BaseCompass class. |
[in] | sp | pointer to a buffer of sensitivity values. |
- 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 185 of file hal_compass.h.
#define compassResetSensitivity |
( |
|
ip | ) |
(ip)->vmt->reset_sensitivity(ip) |
Reset compass sensitivity data restoring it to its typical value.
- Parameters
-
- 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 200 of file hal_compass.h.