magneto6 2.1.0.0
|
API for configuring and manipulating Magneto 6 Click driver. More...
Topics | |
Magneto 6 Registers List | |
List of registers of Magneto 6 Click driver. | |
Magneto 6 Registers Settings | |
Settings for registers of Magneto 6 Click driver. | |
Magneto 6 MikroBUS Map | |
MikroBUS pin mapping of Magneto 6 Click driver. | |
Functions | |
void | magneto6_cfg_setup (magneto6_cfg_t *cfg) |
Magneto 6 configuration object setup function. | |
err_t | magneto6_init (magneto6_t *ctx, magneto6_cfg_t *cfg) |
Magneto 6 initialization function. | |
err_t | magneto6_default_cfg (magneto6_t *ctx) |
Magneto 6 default configuration function. | |
err_t | magneto6_write_reg (magneto6_t *ctx, uint8_t reg, uint8_t data_in) |
Magneto 6 write reg function. | |
err_t | magneto6_read_reg (magneto6_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Magneto 6 read reg function. | |
void | magneto6_set_ien_pin (magneto6_t *ctx, uint8_t state) |
Magneto 6 set ien pin function. | |
uint8_t | magneto6_get_int_pin (magneto6_t *ctx) |
Magneto 6 get int pin function. | |
err_t | magneto6_read_data (magneto6_t *ctx, magneto6_data_t *data_out) |
Magneto 6 read data function. | |
API for configuring and manipulating Magneto 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 magneto6_cfg_setup | ( | magneto6_cfg_t * | cfg | ) |
Magneto 6 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See magneto6_cfg_t object definition for detailed explanation. |
err_t magneto6_default_cfg | ( | magneto6_t * | ctx | ) |
Magneto 6 default configuration function.
This function executes a default configuration of Magneto 6 click board.
[in] | ctx | : Click context object. See magneto6_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t magneto6_get_int_pin | ( | magneto6_t * | ctx | ) |
Magneto 6 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See magneto6_t object definition for detailed explanation. |
err_t magneto6_init | ( | magneto6_t * | ctx, |
magneto6_cfg_t * | cfg ) |
Magneto 6 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See magneto6_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See magneto6_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t magneto6_read_data | ( | magneto6_t * | ctx, |
magneto6_data_t * | data_out ) |
Magneto 6 read data function.
This function reads the measurements of the 3-axes magnetic field sensor in mT and the temperature sensor in degrees Celsius.
[in] | ctx | : Click context object. See magneto6_t object definition for detailed explanation. |
[out] | data_out | : Output read data. See magneto6_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t magneto6_read_reg | ( | magneto6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Magneto 6 read reg function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See magneto6_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void magneto6_set_ien_pin | ( | magneto6_t * | ctx, |
uint8_t | state ) |
Magneto 6 set ien pin function.
This function sets the IEN pin logic state.
[in] | ctx | : Click context object. See magneto6_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t magneto6_write_reg | ( | magneto6_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Magneto 6 write reg function.
This function writes a data byte to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See magneto6_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.