|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
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
21 #ifndef HMC5843_NO_IRQ
53 volatile uint8_t fake_mag_eoc = 0;
97 for (
int i = 0; i < 3; i++) {
109 #ifdef USE_HMC59843_ARCH_RESET
125 #ifdef HMC5843_NO_IRQ
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
uint16_t len_r
Number of bytes to read/receive.
void hmc5843_idle_task(void)
void exti9_5_irq_handler(void)
@ I2CTransTx
transmit only transaction
@ I2CTransFailed
transaction failed
struct i2c_transaction i2c_trans
static bool i2c_idle(struct i2c_periph *p)
Check if I2C bus is idle.
void hmc5843_arch_init(void)
uint8_t len_w
Number of bytes to write/transmit.
@ I2CTransSuccess
transaction successfully finished by I2C driver
@ I2CTransRx
receive only transaction
@ I2CTransRunning
transaction is currently ongoing
static void send_config(void)
enum I2CTransactionStatus status
Transaction status.
arch independent LED (Light Emitting Diodes) API
uint8_t slave_addr
Slave address.
void hmc5843_periodic(void)
@ I2CTransPending
transaction is pending in queue
static bool i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
Submit a I2C transaction.
enum I2CTransactionType type
Transaction type.
void hmc5843_arch_reset(void)