c3dhall4 2.1.0.0
|
API for configuring and manipulating 3D Hall 4 Click driver. More...
Topics | |
3D Hall 4 Registers List | |
List of registers of 3D Hall 4 Click driver. | |
3D Hall 4 Registers Settings | |
Settings for registers of 3D Hall 4 Click driver. | |
3D Hall 4 MikroBUS Map | |
MikroBUS pin mapping of 3D Hall 4 Click driver. | |
Functions | |
void | c3dhall4_cfg_setup (c3dhall4_cfg_t *cfg) |
3D Hall 4 configuration object setup function. | |
err_t | c3dhall4_init (c3dhall4_t *ctx, c3dhall4_cfg_t *cfg) |
3D Hall 4 initialization function. | |
err_t | c3dhall4_default_cfg (c3dhall4_t *ctx) |
3D Hall 4 default configuration function. | |
err_t | c3dhall4_reg_write (c3dhall4_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
3D Hall 4 reg write function. | |
err_t | c3dhall4_reg_read (c3dhall4_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
3D Hall 4 reg read function. | |
err_t | c3dhall4_eeprom_write (c3dhall4_t *ctx, uint8_t address, uint8_t data_in) |
3D Hall 4 EEPROM write function. | |
err_t | c3dhall4_eeprom_read (c3dhall4_t *ctx, uint8_t address, uint8_t *data_out) |
3D Hall 4 EEPROM read function. | |
err_t | c3dhall4_eeprom_update_cksum (c3dhall4_t *ctx) |
3D Hall 4 EEPROM update cksum function. | |
err_t | c3dhall4_read_an_pin_value (c3dhall4_t *ctx, uint16_t *data_out) |
3D Hall 4 read AN pin value function. | |
err_t | c3dhall4_read_an_pin_voltage (c3dhall4_t *ctx, float *data_out) |
3D Hall 4 read AN pin voltage level function. | |
err_t | c3dhall4_read_data (c3dhall4_t *ctx, c3dhall4_data_t *data_out) |
3D Hall 4 read data function. | |
API for configuring and manipulating 3D Hall 4 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void c3dhall4_cfg_setup | ( | c3dhall4_cfg_t * | cfg | ) |
3D Hall 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c3dhall4_cfg_t object definition for detailed explanation. |
err_t c3dhall4_default_cfg | ( | c3dhall4_t * | ctx | ) |
3D Hall 4 default configuration function.
This function executes a default configuration of 3D Hall 4 click board.
[in] | ctx | : Click context object. See c3dhall4_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall4_eeprom_read | ( | c3dhall4_t * | ctx, |
uint8_t | address, | ||
uint8_t * | data_out ) |
3D Hall 4 EEPROM read function.
This function reads data from the selected EEPROM address by using SPI serial interface.
[in] | ctx | : Click context object. See c3dhall4_t object definition for detailed explanation. |
[in] | address | : EEPROM address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall4_eeprom_update_cksum | ( | c3dhall4_t * | ctx | ) |
3D Hall 4 EEPROM update cksum function.
This function updates EEPROM checksum. It must be called after EEPROM write in order for the changes to take effect after power up.
[in] | ctx | : Click context object. See c3dhall4_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall4_eeprom_write | ( | c3dhall4_t * | ctx, |
uint8_t | address, | ||
uint8_t | data_in ) |
3D Hall 4 EEPROM write function.
This function writes a desired data to the selected EEPROM address by using SPI serial interface.
[in] | ctx | : Click context object. See c3dhall4_t object definition for detailed explanation. |
[in] | address | : EEPROM address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall4_init | ( | c3dhall4_t * | ctx, |
c3dhall4_cfg_t * | cfg ) |
3D Hall 4 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c3dhall4_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c3dhall4_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall4_read_an_pin_value | ( | c3dhall4_t * | ctx, |
uint16_t * | data_out ) |
3D Hall 4 read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See c3dhall4_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall4_read_an_pin_voltage | ( | c3dhall4_t * | ctx, |
float * | data_out ) |
3D Hall 4 read AN pin voltage level function.
This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
[in] | ctx | : Click context object. See c3dhall4_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall4_read_data | ( | c3dhall4_t * | ctx, |
c3dhall4_data_t * | data_out ) |
3D Hall 4 read data function.
This function reads the measurement status, 3-axes magnetic field data, and the chip internal temperature.
[in] | ctx | : Click context object. See c3dhall4_t object definition for detailed explanation. |
[out] | data_out | : Output read data. See c3dhall4_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall4_reg_read | ( | c3dhall4_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
3D Hall 4 reg read function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See c3dhall4_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. err_t c3dhall4_reg_write | ( | c3dhall4_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
3D Hall 4 reg write function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See c3dhall4_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.