c3dhall14
2.1.0.0
|
API for configuring and manipulating 3D Hall 14 Click driver. More...
Modules | |
3D Hall 14 Registers List | |
List of registers of 3D Hall 14 Click driver. | |
3D Hall 14 Registers Settings | |
Settings for registers of 3D Hall 14 Click driver. | |
3D Hall 14 MikroBUS Map | |
MikroBUS pin mapping of 3D Hall 14 Click driver. | |
Functions | |
void | c3dhall14_cfg_setup (c3dhall14_cfg_t *cfg) |
3D Hall 14 configuration object setup function. More... | |
err_t | c3dhall14_init (c3dhall14_t *ctx, c3dhall14_cfg_t *cfg) |
3D Hall 14 initialization function. More... | |
err_t | c3dhall14_default_cfg (c3dhall14_t *ctx) |
3D Hall 14 default configuration function. More... | |
err_t | c3dhall14_mem_write_single (c3dhall14_t *ctx, uint8_t reg, uint8_t data_in) |
3D Hall 14 mem write single function. More... | |
err_t | c3dhall14_mem_write_multi (c3dhall14_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
3D Hall 14 mem write multi function. More... | |
err_t | c3dhall14_mem_direct_read (c3dhall14_t *ctx, uint8_t *data_out, uint8_t len) |
3D Hall 14 mem direct read function. More... | |
err_t | c3dhall14_mem_read (c3dhall14_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
3D Hall 14 mem read function. More... | |
err_t | c3dhall14_check_communication (c3dhall14_t *ctx) |
3D Hall 14 check communication function. More... | |
uint8_t | c3dhall14_get_int_pin (c3dhall14_t *ctx) |
3D Hall 14 get int pin function. More... | |
err_t | c3dhall14_check_data_ready (c3dhall14_t *ctx) |
3D Hall 14 check data ready function. More... | |
err_t | c3dhall14_get_magnetic_flux (c3dhall14_t *ctx, float *x_axis, float *y_axis, float *z_axis) |
3D Hall 14 get magnetic flux function. More... | |
err_t | c3dhall14_get_temperature (c3dhall14_t *ctx, float *temperature) |
3D Hall 14 get temperature function. More... | |
err_t | c3dhall14_reset (c3dhall14_t *ctx) |
3D Hall 14 reset function. More... | |
err_t | c3dhall14_set_operating_mode (c3dhall14_t *ctx, uint8_t mode) |
3D Hall 14 set operating mode function. More... | |
err_t | c3dhall14_set_range (c3dhall14_t *ctx, uint8_t range) |
3D Hall 14 set range function. More... | |
err_t | c3dhall14_enable_temp_sensor (c3dhall14_t *ctx, uint8_t enable) |
3D Hall 14 enable temp sensor function. More... | |
err_t | c3dhall14_enable_drdy_int (c3dhall14_t *ctx, uint8_t enable) |
3D Hall 14 enable drdy int function. More... | |
API for configuring and manipulating 3D Hall 14 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void c3dhall14_cfg_setup | ( | c3dhall14_cfg_t * | cfg | ) |
3D Hall 14 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c3dhall14_cfg_t object definition for detailed explanation. |
err_t c3dhall14_check_communication | ( | c3dhall14_t * | ctx | ) |
3D Hall 14 check communication function.
This function checks the communication by reading and verifying the company and device identification registers.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall14_check_data_ready | ( | c3dhall14_t * | ctx | ) |
3D Hall 14 check data ready function.
This function checks if the data is ready.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
1
- Data is ready, 0
- Data is not ready, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall14_default_cfg | ( | c3dhall14_t * | ctx | ) |
3D Hall 14 default configuration function.
This function executes a default configuration of 3D Hall 14 click board.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall14_enable_drdy_int | ( | c3dhall14_t * | ctx, |
uint8_t | enable | ||
) |
3D Hall 14 enable drdy int function.
This function enables or disables the data ready interrupt output.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
[in] | enable | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall14_enable_temp_sensor | ( | c3dhall14_t * | ctx, |
uint8_t | enable | ||
) |
3D Hall 14 enable temp sensor function.
This function enables or disables the internal temperature sensor.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
[in] | enable | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t c3dhall14_get_int_pin | ( | c3dhall14_t * | ctx | ) |
3D Hall 14 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
err_t c3dhall14_get_magnetic_flux | ( | c3dhall14_t * | ctx, |
float * | x_axis, | ||
float * | y_axis, | ||
float * | z_axis | ||
) |
3D Hall 14 get magnetic flux function.
This function reads the raw values of X, Y, and Z axis and converts them to magnetic flux data in microTesla.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
[out] | x_axis | : X-axis data in microTesla. |
[out] | y_axis | : Y-axis data in microTesla. |
[out] | z_axis | : Z-axis data in microTesla. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall14_get_temperature | ( | c3dhall14_t * | ctx, |
float * | temperature | ||
) |
3D Hall 14 get temperature function.
This function reads the raw temperature value and converts it to Celsius.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
[out] | temperature | : Internal temperature data in Celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall14_init | ( | c3dhall14_t * | ctx, |
c3dhall14_cfg_t * | cfg | ||
) |
3D Hall 14 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c3dhall14_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall14_mem_direct_read | ( | c3dhall14_t * | ctx, |
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
3D Hall 14 mem direct read function.
This function reads a desired number of data bytes starting from the register at address 0x00 by using I2C serial interface.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
[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 c3dhall14_mem_read | ( | c3dhall14_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
3D Hall 14 mem read 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 c3dhall14_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 c3dhall14_mem_write_multi | ( | c3dhall14_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
3D Hall 14 mem write multi function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See c3dhall14_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. err_t c3dhall14_mem_write_single | ( | c3dhall14_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
3D Hall 14 mem write single function.
This function writes a single data byte to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall14_reset | ( | c3dhall14_t * | ctx | ) |
3D Hall 14 reset function.
This function resets the device to factory settings.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall14_set_operating_mode | ( | c3dhall14_t * | ctx, |
uint8_t | mode | ||
) |
3D Hall 14 set operating mode function.
This function sets the device operating mode.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
[in] | mode | : Operating mode. See 3D Hall 14 operating mode values macros definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c3dhall14_set_range | ( | c3dhall14_t * | ctx, |
uint8_t | range | ||
) |
3D Hall 14 set range function.
This function sets the magnetic flux measurement range.
[in] | ctx | : Click context object. See c3dhall14_t object definition for detailed explanation. |
[in] | range | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation.