EX Generic Compass Interface.
More...
EX Generic Compass Interface.
◆ _base_compass_methods_alone
#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);
BaseCompass specific methods.
Definition at line 49 of file ex_compass.h.
◆ _base_compass_methods
#define _base_compass_methods |
Value: _base_sensor_methods \
_base_compass_methods_alone
BaseCompass specific methods with inherited ones.
Definition at line 63 of file ex_compass.h.
◆ _base_compass_data
◆ compassGetAxesNumber
#define compassGetAxesNumber |
( |
| ip | ) |
|
Value: (ip)->
vmt->get_channels_number(ip)
static const struct EFlashDriverVMT vmt
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 ex_compass.h.
◆ compassReadRaw
#define compassReadRaw |
( |
| ip, |
|
|
| dp ) |
Value: (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 ex_compass.h.
◆ compassReadCooked
#define compassReadCooked |
( |
| ip, |
|
|
| dp ) |
Value: (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 ex_compass.h.
◆ compassSetBias
#define compassSetBias |
( |
| ip, |
|
|
| bp ) |
Value: (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 ex_compass.h.
◆ compassResetBias
#define compassResetBias |
( |
| ip | ) |
|
Value: (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 ex_compass.h.
◆ compassSetSensitivity
#define compassSetSensitivity |
( |
| ip, |
|
|
| sp ) |
Value: (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 ex_compass.h.
◆ compassResetSensitivity
#define compassResetSensitivity |
( |
| ip | ) |
|
Value: (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 ex_compass.h.