driver mag3110 basic header file
uint8_t mag3110_set_rate_over_sample(mag3110_handle_t *handle, mag3110_rate_over_sample_t rate_over_sample)
set rate over sample
uint8_t mag3110_set_trigger_mode(mag3110_handle_t *handle, mag3110_bool_t enable)
enable or disable trigger mode
struct mag3110_handle_s mag3110_handle_t
mag3110 handle structure definition
uint8_t mag3110_set_mode(mag3110_handle_t *handle, mag3110_mode_t mode)
set mode
uint8_t mag3110_set_disable_offset_correction(mag3110_handle_t *handle, mag3110_bool_t enable)
enable or disable offset correction
uint8_t mag3110_deinit(mag3110_handle_t *handle)
close the chip
uint8_t mag3110_init(mag3110_handle_t *handle)
initialize the chip
uint8_t mag3110_set_offset_y(mag3110_handle_t *handle, uint16_t offset)
set offset y
uint8_t mag3110_set_offset_x(mag3110_handle_t *handle, uint16_t offset)
set offset x
uint8_t mag3110_set_automatic_magnetic_sensor_reset(mag3110_handle_t *handle, mag3110_bool_t enable)
enable or disable automatic magnetic sensor reset
uint8_t mag3110_read(mag3110_handle_t *handle, int16_t raw[3], float ut[3])
read data
uint8_t mag3110_set_fast_read_mode(mag3110_handle_t *handle, mag3110_bool_t enable)
enable or disable fast read mode
uint8_t mag3110_offset_convert_to_register(mag3110_handle_t *handle, float ut, uint16_t *reg)
convert the offset to the register raw data
uint8_t mag3110_set_offset_z(mag3110_handle_t *handle, uint16_t offset)
set offset z
uint8_t mag3110_basic_init(void)
basic example init
uint8_t mag3110_basic_deinit(void)
basic example deinit
#define MAG3110_BASIC_DEFAULT_TRIGGER_MODE
#define MAG3110_BASIC_DEFAULT_FAST_READ
#define MAG3110_BASIC_DEFAULT_OFFSET
mag3110 basic example default definition
uint8_t mag3110_basic_read(float ut[3])
basic example read
#define MAG3110_BASIC_DEFAULT_AUTO_RESET
#define MAG3110_BASIC_DEFAULT_DISABLE_OFFSET_CORRECTION
#define MAG3110_BASIC_DEFAULT_RATE_OVER_SAMPLE
uint8_t mag3110_interface_iic_deinit(void)
interface iic bus deinit
void mag3110_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t mag3110_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
uint8_t mag3110_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
uint8_t mag3110_interface_iic_init(void)
interface iic bus init
void mag3110_interface_debug_print(const char *const fmt,...)
interface print format data
#define DRIVER_MAG3110_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_MAG3110_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_MAG3110_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_MAG3110_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_MAG3110_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
#define DRIVER_MAG3110_LINK_INIT(HANDLE, STRUCTURE)
initialize mag3110_handle_t structure
#define DRIVER_MAG3110_LINK_IIC_WRITE(HANDLE, FUC)
link iic_write function