|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
94 #define Int16FromBuf(_buf,_idx) ((int16_t)(_buf[_idx] | (_buf[_idx+1] << 8)))
#define Int16FromBuf(_buf, _idx)
Default Ak8963 structure.
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
@ I2CTransFailed
transaction failed
enum Ak8963ConfStatus init_status
init status
void ak8963_init(struct Ak8963 *ak, struct i2c_periph *i2c_p, uint8_t addr)
Initialize AK8963 struct.
@ I2CTransSuccess
transaction successfully finished by I2C driver
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
struct i2c_periph * i2c_p
peripheral used for communcation
bool i2c_transceive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r)
Submit a write/read transaction.
enum I2CTransactionStatus status
Transaction status.
bool initialized
config done flag
#define AK8963_CNTL1_CM_2
enum Ak8963Status status
main status
uint8_t slave_addr
Slave address.
void ak8963_configure(struct Ak8963 *ak)
void ak8963_read(struct Ak8963 *ak)
@ I2CTransDone
transaction set to done by user level
struct i2c_transaction i2c_trans
i2c transaction used for communication with the ak8936
volatile bool data_available
data ready flag
void ak8963_event(struct Ak8963 *ak)