c3dhall10
2.0.0.0
|
API for configuring and manipulating 3D Hall 10 Click driver. More...
Modules | |
3D Hall 10 Registers List | |
List of registers of 3D Hall 10 Click driver. | |
3D Hall 10 Registers Settings | |
Settings for registers of 3D Hall 10 Click driver. | |
3D Hall 10 MikroBUS Map | |
MikroBUS pin mapping of 3D Hall 10 Click driver. | |
Functions | |
void | c3dhall10_cfg_setup (c3dhall10_cfg_t *cfg) |
3D Hall 10 configuration object setup function. More... | |
err_t | c3dhall10_init (c3dhall10_t *ctx, c3dhall10_cfg_t *cfg) |
3D Hall 10 initialization function. More... | |
err_t | c3dhall10_default_cfg (c3dhall10_t *ctx) |
3D Hall 10 default configuration function. More... | |
err_t | c3dhall10_write_frame (c3dhall10_t *ctx, uint8_t reg_addr, uint16_t data_in) |
3D Hall 10 write frame function. More... | |
err_t | c3dhall10_read_frame (c3dhall10_t *ctx, uint8_t reg_addr, uint16_t *data_out, uint16_t *status) |
3D Hall 10 read frame function. More... | |
err_t | c3dhall10_read_data (c3dhall10_t *ctx, c3dhall10_data_t *data_out) |
3D Hall 10 read data function. More... | |
uint8_t | c3dhall10_get_alert_pin (c3dhall10_t *ctx) |
3D Hall 10 get alert pin function. More... | |
API for configuring and manipulating 3D Hall 10 Click driver.
void c3dhall10_cfg_setup | ( | c3dhall10_cfg_t * | cfg | ) |
3D Hall 10 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c3dhall10_cfg_t object definition for detailed explanation. |
err_t c3dhall10_default_cfg | ( | c3dhall10_t * | ctx | ) |
3D Hall 10 default configuration function.
This function executes a default configuration of 3D Hall 10 click board.
[in] | ctx | : Click context object. See c3dhall10_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t c3dhall10_get_alert_pin | ( | c3dhall10_t * | ctx | ) |
3D Hall 10 get alert pin function.
This function returns the alert (ALR) pin logic state. The alert pin is configured as a conversion complete interrupt by default.
[in] | ctx | : Click context object. See c3dhall10_t object definition for detailed explanation. |
err_t c3dhall10_init | ( | c3dhall10_t * | ctx, |
c3dhall10_cfg_t * | cfg | ||
) |
3D Hall 10 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c3dhall10_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c3dhall10_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall10_read_data | ( | c3dhall10_t * | ctx, |
c3dhall10_data_t * | data_out | ||
) |
3D Hall 10 read data function.
This function reads new data which consists of X, Y, and Z axis values in mT, and temperature in Celsius. It also reads the angle in Degrees between X and Y by default, and magnitude data as well.
[in] | ctx | : Click context object. See c3dhall10_t object definition for detailed explanation. |
[out] | data_out | : 16-bit data output read. See c3dhall10_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall10_read_frame | ( | c3dhall10_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t * | data_out, | ||
uint16_t * | status | ||
) |
3D Hall 10 read frame function.
This function reads data and status from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See c3dhall10_t object definition for detailed explanation. |
[in] | reg_addr | : Register address. |
[out] | data_out | : 16-bit data output read. |
[out] | status | : 12-bit status output read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall10_write_frame | ( | c3dhall10_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t | data_in | ||
) |
3D Hall 10 write frame function.
This function writes a desired data to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See c3dhall10_t object definition for detailed explanation. |
[in] | reg_addr | : Register address. |
[in] | data_in | : 16-bit data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.