compass4 2.0.0.0
|
This file contains API for Compass 4 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | compass4_axis_t |
struct | compass4_flux_t |
struct | compass4_s |
Click ctx object definition. More... | |
struct | compass4_cfg_t |
Click configuration structure definition. More... | |
Typedefs | |
typedef uint8_t | compass4_select_t |
Communication type. | |
typedef void(* | compass4_master_io_t) (struct compass4_s *, uint8_t, uint8_t *, uint8_t) |
Master Input/Output type. | |
typedef struct compass4_s | compass4_t |
Click ctx object definition. | |
Functions | |
void | compass4_cfg_setup (compass4_cfg_t *cfg) |
Config Object Initialization function. | |
COMPASS4_RETVAL | compass4_init (compass4_t *ctx, compass4_cfg_t *cfg) |
Initialization function. | |
void | compass4_generic_write (compass4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | compass4_generic_read (compass4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | compass4_hardware_reset (compass4_t *ctx) |
Hardware reset function. | |
void | compass4_set_rst_pin_state (compass4_t *ctx, uint8_t state) |
Sets RST pin state. | |
void | compass4_software_reset (compass4_t *ctx) |
Software reset function. | |
void | compass4_configuration (compass4_t *ctx, uint8_t cfg1, uint8_t cfg2) |
Configuration function. | |
uint8_t | compass4_get_status (compass4_t *ctx, uint8_t status) |
Get status. | |
uint8_t | compass4_check_device (compass4_t *ctx) |
Check device function. | |
uint8_t | compass4_get_interrupt (compass4_t *ctx) |
Gets INT pin state (DRDY pin) | |
uint8_t | compass4_get_axis (compass4_t *ctx, compass4_axis_t *axis) |
Gets X\Y\Z Axis value. | |
uint8_t | compass4_get_single_axis (compass4_t *ctx, uint8_t axis_reg, int16_t *axis_data) |
Gets single axis value. | |
uint8_t | compass4_get_magnetic_flux (compass4_t *ctx, compass4_flux_t *flux) |
Gets magnetic flux of X\Y\Z axis value. | |
uint8_t | compass4_get_single_magnetic_flux (compass4_t *ctx, uint8_t axis, float *flux_data) |
Gets single axis flux value. | |
This file contains API for Compass 4 Click driver.