compass6 2.0.0.0
|
API for configuring and manipulating Compass 6 Click driver. More...
Topics | |
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. | |
err_t | compass6_init (compass6_t *ctx, compass6_cfg_t *cfg) |
Compass 6 initialization function. | |
err_t | compass6_default_cfg (compass6_t *ctx) |
Compass 6 default configuration function. | |
err_t | compass6_generic_write (compass6_t *ctx, uint8_t reg, uint8_t tx_data) |
Compass 6 I2C writing function. | |
err_t | compass6_generic_read (compass6_t *ctx, uint8_t reg, uint8_t *rx_data) |
Compass 6 I2C reading function. | |
uint8_t | compass6_data_ready (compass6_t *ctx) |
Get data ready pin state. | |
err_t | compass6_get_axes_data (compass6_t *ctx, compass6_axes_t *axes_data) |
Magnetic axes data reading. | |
API for configuring and manipulating Compass 6 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
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.