71 float low_threshold_ut,
float high_threshold_ut,
void (*callback)(uint8_t type))
driver bmm150 interrupt header file
uint8_t bmm150_deinit(bmm150_handle_t *handle)
close the chip
uint8_t bmm150_init(bmm150_handle_t *handle)
initialize the chip
uint8_t bmm150_set_data_ready_pin(bmm150_handle_t *handle, bmm150_bool_t enable)
enable or disable data ready pin
uint8_t bmm150_set_repz_number(bmm150_handle_t *handle, uint8_t number)
set repz number
uint8_t bmm150_set_interrupt_pin(bmm150_handle_t *handle, bmm150_bool_t enable)
enable or disable interrupt pin
uint8_t bmm150_set_addr_pin(bmm150_handle_t *handle, bmm150_address_t addr_pin)
set the iic address pin
uint8_t bmm150_set_advanced_self_test(bmm150_handle_t *handle, bmm150_advanced_self_test_t test)
set advanced self test
uint8_t bmm150_set_data_ready_pin_polarity(bmm150_handle_t *handle, bmm150_data_ready_pin_polarity_t polarity)
set data ready pin polarity
uint8_t bmm150_set_interrupt_pin_polarity(bmm150_handle_t *handle, bmm150_interrupt_pin_polarity_t polarity)
set interrupt pin polarity
uint8_t bmm150_set_interface(bmm150_handle_t *handle, bmm150_interface_t interface)
set the chip interface
bmm150_interface_t
bmm150 interface enumeration definition
uint8_t bmm150_set_high_threshold(bmm150_handle_t *handle, int8_t threshold)
set high threshold
uint8_t bmm150_irq_handler(bmm150_handle_t *handle)
irq handler
uint8_t bmm150_set_channel_y(bmm150_handle_t *handle, bmm150_bool_t enable)
enable or disable channel y
bmm150_bool_t
bmm150 bool enumeration definition
uint8_t bmm150_set_mode(bmm150_handle_t *handle, bmm150_mode_t mode)
set mode
uint8_t bmm150_set_power_on(bmm150_handle_t *handle, bmm150_bool_t enable)
set power on
uint8_t bmm150_set_low_threshold(bmm150_handle_t *handle, int8_t threshold)
set low threshold
uint8_t bmm150_get_interrupt_status(bmm150_handle_t *handle, bmm150_interrupt_status_t status, bmm150_bool_t *enable)
get interrupt status
struct bmm150_handle_s bmm150_handle_t
bmm150 handle structure definition
uint8_t bmm150_set_self_test(bmm150_handle_t *handle, bmm150_bool_t enable)
enable or disable self test
uint8_t bmm150_set_interrupt_latch(bmm150_handle_t *handle, bmm150_bool_t enable)
enable or disable interrupt latch
uint8_t bmm150_read(bmm150_handle_t *handle, int16_t raw[3], float ut[3])
read data
uint8_t bmm150_set_channel_z(bmm150_handle_t *handle, bmm150_bool_t enable)
enable or disable channel z
uint8_t bmm150_set_repxy_number(bmm150_handle_t *handle, uint8_t number)
set repxy number
bmm150_address_t
bmm150 address enumeration definition
uint8_t bmm150_set_interrupt(bmm150_handle_t *handle, bmm150_interrupt_status_t status, bmm150_bool_t enable)
enable or disable interrupt
uint8_t bmm150_interrupt_threshold_convert_to_register(bmm150_handle_t *handle, float ut, int8_t *reg)
convert the interrupt threshold to the register raw data
uint8_t bmm150_set_data_rate(bmm150_handle_t *handle, bmm150_data_rate_t rate)
set data rate
uint8_t bmm150_set_channel_x(bmm150_handle_t *handle, bmm150_bool_t enable)
enable or disable channel x
@ BMM150_INTERRUPT_STATUS_HIGH_THRESHOLD_Z
@ BMM150_INTERRUPT_STATUS_LOW_THRESHOLD_Y
@ BMM150_INTERRUPT_STATUS_OVERFLOW
@ BMM150_INTERRUPT_STATUS_HIGH_THRESHOLD_Y
@ BMM150_INTERRUPT_STATUS_DATA_OVERRUN
@ BMM150_INTERRUPT_STATUS_LOW_THRESHOLD_X
@ BMM150_INTERRUPT_STATUS_HIGH_THRESHOLD_X
@ BMM150_INTERRUPT_STATUS_LOW_THRESHOLD_Z
@ BMM150_ADVANCED_SELF_TEST_NORMAL
#define BMM150_INTERRUPT_DEFAULT_REPZ
#define BMM150_INTERRUPT_DEFAULT_DATA_READY_PIN_POLARITY
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_Z
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_Y
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_PIN_POLARITY
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_OVERFLOW
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_DATA_OVERRUN
bmm150 interrupt example default definition
uint8_t bmm150_interrupt_irq_handler(void)
interrupt irq
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_Z
uint8_t bmm150_interrupt_init(bmm150_interface_t interface, bmm150_address_t addr_pin, float low_threshold_ut, float high_threshold_ut, void(*callback)(uint8_t type))
interrupt example init
uint8_t bmm150_interrupt_deinit(void)
interrupt example deinit
#define BMM150_INTERRUPT_DEFAULT_REPXY
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_X
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_PIN
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_HIGH_THRESHOLD_Y
#define BMM150_INTERRUPT_DEFAULT_DATA_RATE
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LATCH
#define BMM150_INTERRUPT_DEFAULT_INTERRUPT_LOW_THRESHOLD_X
#define BMM150_INTERRUPT_DEFAULT_DATA_READY_PIN
uint8_t bmm150_interrupt_read(float ut[3])
interrupt example read
uint8_t bmm150_interface_spi_init(void)
interface spi bus init
uint8_t bmm150_interface_spi_read(uint8_t reg, uint8_t *buf, uint16_t len)
interface spi bus read
uint8_t bmm150_interface_spi_write(uint8_t reg, uint8_t *buf, uint16_t len)
interface spi bus write
uint8_t bmm150_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
uint8_t bmm150_interface_iic_init(void)
interface iic bus init
uint8_t bmm150_interface_spi_deinit(void)
interface spi bus deinit
uint8_t bmm150_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
uint8_t bmm150_interface_iic_deinit(void)
interface iic bus deinit
void bmm150_interface_debug_print(const char *const fmt,...)
interface print format data
void bmm150_interface_delay_ms(uint32_t ms)
interface delay ms
#define DRIVER_BMM150_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_BMM150_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_BMM150_LINK_IIC_WRITE(HANDLE, FUC)
link iic_write function
#define DRIVER_BMM150_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_BMM150_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_BMM150_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
link receive_callback function
#define DRIVER_BMM150_LINK_SPI_WRITE(HANDLE, FUC)
link spi_write function
#define DRIVER_BMM150_LINK_INIT(HANDLE, STRUCTURE)
initialize bmm150_handle_t structure
#define DRIVER_BMM150_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
#define DRIVER_BMM150_LINK_SPI_DEINIT(HANDLE, FUC)
link spi_deinit function
#define DRIVER_BMM150_LINK_SPI_READ(HANDLE, FUC)
link spi_read function
#define DRIVER_BMM150_LINK_SPI_INIT(HANDLE, FUC)
link spi_init function