5#define HMC5843_TIMEOUT 100
7#define bswap_16(x) ((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8))
12#ifndef HMC5843_I2C_DEV
13#define HMC5843_I2C_DEV i2c2
31 hmc5843.i2c_trans.buf[1] = 0x00 | (0x06 << 2);
38 hmc5843.i2c_trans.buf[1] = 0x01 << 5;
45 hmc5843.i2c_trans.buf[1] = 0x00;
53volatile uint8_t fake_mag_eoc = 0;
97 for (
int i = 0; i < 3; i++) {
109#ifdef USE_HMC59843_ARCH_RESET
114 hmc5843.i2c_trans.buf[0] = 0x3;
static bool i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
Submit a I2C transaction.
static bool i2c_idle(struct i2c_periph *p)
Check if I2C bus is idle.
@ I2CTransRunning
transaction is currently ongoing
@ I2CTransSuccess
transaction successfully finished by I2C driver
@ I2CTransFailed
transaction failed
@ I2CTransPending
transaction is pending in queue
@ I2CTransRx
receive only transaction
@ I2CTransTx
transmit only transaction
static void send_config(void)
void exti9_5_irq_handler(void)
void hmc5843_idle_task(void)
void hmc5843_periodic(void)
void hmc5843_arch_reset(void)
void hmc5843_arch_init(void)
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
arch independent LED (Light Emitting Diodes) API
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.