94 #define Int16FromBuf(_buf,_idx) ((int16_t)(_buf[_idx] | (_buf[_idx+1] << 8)))
Register and address definitions for AK8963 magnetometer.
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
transaction successfully finished by I2C driver
#define Int16FromBuf(_buf, _idx)
void ak8963_init(struct Ak8963 *ak, struct i2c_periph *i2c_p, uint8_t addr)
Initialize AK8963 struct.
bool initialized
config done flag
enum Ak8963Status status
main status
Default Ak8963 structure.
void ak8963_read(struct Ak8963 *ak)
transaction set to done by user level
struct i2c_periph * i2c_p
peripheral used for communcation
enum Ak8963ConfStatus init_status
init status
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 i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
uint8_t slave_addr
Slave address.
I2C peripheral structure.
void ak8963_event(struct Ak8963 *ak)
void ak8963_configure(struct Ak8963 *ak)
volatile bool data_available
data ready flag
struct i2c_transaction i2c_trans
i2c transaction used for communication with the ak8936
#define AK8963_CNTL1_CM_2