|
compass6
2.0.0.0
|
API for configuring and manipulating Compass 6 Click driver. More...
Modules | |
| Compass 6 Registers List | |
| List of registers of Compass 6 Click driver. | |
| Compass 6 Registers Settings | |
| Settings for registers of Compass 6 Click driver. | |
| Compass 6 MikroBUS Map | |
| MikroBUS pin mapping of Compass 6 Click driver. | |
Functions | |
| void | compass6_cfg_setup (compass6_cfg_t *cfg) |
| Compass 6 configuration object setup function. More... | |
| err_t | compass6_init (compass6_t *ctx, compass6_cfg_t *cfg) |
| Compass 6 initialization function. More... | |
| err_t | compass6_default_cfg (compass6_t *ctx) |
| Compass 6 default configuration function. More... | |
| err_t | compass6_generic_write (compass6_t *ctx, uint8_t reg, uint8_t tx_data) |
| Compass 6 I2C writing function. More... | |
| err_t | compass6_generic_read (compass6_t *ctx, uint8_t reg, uint8_t *rx_data) |
| Compass 6 I2C reading function. More... | |
| uint8_t | compass6_data_ready (compass6_t *ctx) |
| Get data ready pin state. More... | |
| err_t | compass6_get_axes_data (compass6_t *ctx, compass6_axes_t *axes_data) |
| Magnetic axes data reading. More... | |
API for configuring and manipulating Compass 6 Click driver.
| void compass6_cfg_setup | ( | compass6_cfg_t * | cfg | ) |
Compass 6 configuration object setup function.
This function initializes click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See compass6_cfg_t object definition for detailed explanation. |
| uint8_t compass6_data_ready | ( | compass6_t * | ctx | ) |
Get data ready pin state.
This function reads logic state of data ready(interrupt) pin.
| [in] | ctx | : Click context object. See #accel4_t object definition for detailed explanation. |
| err_t compass6_default_cfg | ( | compass6_t * | ctx | ) |
Compass 6 default configuration function.
This function executes a default configuration of Compass 6 click board.
| [in] | ctx | : Click context object. See compass6_t object definition for detailed explanation. |
0 - Success, -1 - Error.| err_t compass6_generic_read | ( | compass6_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | rx_data | ||
| ) |
Compass 6 I2C reading function.
This function reads a byte from the selected register.
| [in] | ctx | : Click context object. See compass6_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | rx_data | : Output read data. |
0 - Success, -1 - Error.| err_t compass6_generic_write | ( | compass6_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t | tx_data | ||
| ) |
Compass 6 I2C writing function.
This function writes a byte to the selected register.
| [in] | ctx | : Click context object. See compass6_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [in] | tx_data | : Data to be written. |
0 - Success, -1 - Error.| err_t compass6_get_axes_data | ( | compass6_t * | ctx, |
| compass6_axes_t * | axes_data | ||
| ) |
Magnetic axes data reading.
This function reads a magnetic axes data.
| [in] | ctx | : Click context object. See compass6_t object definition for detailed explanation. |
| [out] | axes | : Axes data object. See compass6_axes_t object definition for detailed explanation. |
0 - Success, -1 - Error.| err_t compass6_init | ( | compass6_t * | ctx, |
| compass6_cfg_t * | cfg | ||
| ) |
Compass 6 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
| [out] | ctx | : Click context object. See compass6_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See compass6_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error.