Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
#include "mcu_periph/i2c.h"
#include "peripherals/hmc5843_arch.h"
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | Hmc5843 |
union | Hmc5843.data |
Macros | |
#define | HMC5843_ADDR 0x3C |
#define | HMC5843_REG_CFGA 0x00 |
#define | HMC5843_REG_CFGB 0x01 |
#define | HMC5843_REG_MODE 0x02 |
#define | HMC5843_REG_DATXM 0x03 |
#define | HMC5843_REG_DATXL 0x04 |
#define | HMC5843_REG_DATYM 0x05 |
#define | HMC5843_REG_DATYL 0x06 |
#define | HMC5843_REG_DATZM 0x07 |
#define | HMC5843_REG_DATZL 0x08 |
#define | HMC5843_REG_STATUS 0x09 |
#define | HMC5843_REG_IDA 0x0A |
#define | HMC5843_REG_IDB 0x0B |
#define | HMC5843_REG_IDC 0x0C |
Functions | |
void | hmc5843_arch_init (void) |
void | hmc5843_arch_reset (void) |
void | hmc5843_init (void) |
void | hmc5843_periodic (void) |
void | hmc5843_idle_task (void) |
Variables | |
struct Hmc5843 | hmc5843 |
struct Hmc5843 |
union Hmc5843.data |
#define HMC5843_ADDR 0x3C |
Definition at line 55 of file hmc5843.h.
Referenced by hmc5843_init().
#define HMC5843_REG_CFGA 0x00 |
Definition at line 58 of file hmc5843.h.
Referenced by send_config().
#define HMC5843_REG_CFGB 0x01 |
Definition at line 59 of file hmc5843.h.
Referenced by send_config().
#define HMC5843_REG_MODE 0x02 |
Definition at line 60 of file hmc5843.h.
Referenced by send_config().
void hmc5843_arch_init | ( | void | ) |
Definition at line 24 of file hmc5843_arch.c.
References GPIO5, GPIOB, and NVIC_EXTI9_5_IRQ.
Referenced by hmc5843_init().
void hmc5843_arch_reset | ( | void | ) |
Definition at line 53 of file hmc5843_arch.c.
Referenced by hmc5843_periodic().
void hmc5843_idle_task | ( | void | ) |
Definition at line 60 of file hmc5843.c.
References bswap_16, i2c_transaction::buf, Hmc5843::data, Hmc5843::data_available, hmc5843, HMC5843_I2C_DEV, i2c_idle(), i2c_submit(), Hmc5843::i2c_trans, I2CIdle, I2CTransFailed, I2CTransPending, I2CTransRunning, I2CTransRx, I2CTransSuccess, I2CTransTx, Hmc5843::initialized, i2c_transaction::len_r, i2c_transaction::len_w, mag_eoc(), Hmc5843::sent_rx, Hmc5843::sent_tx, i2c_transaction::status, Hmc5843::timeout, TRUE, and i2c_transaction::type.
Referenced by hmc5843_module_event().
void hmc5843_init | ( | void | ) |
Definition at line 16 of file hmc5843.c.
References hmc5843, HMC5843_ADDR, hmc5843_arch_init(), Hmc5843::i2c_trans, I2CTransSuccess, i2c_transaction::slave_addr, and i2c_transaction::status.
Referenced by hmc5843_module_init(), and imu_impl_init().
void hmc5843_periodic | ( | void | ) |
Definition at line 103 of file hmc5843.c.
References i2c_transaction::buf, hmc5843, hmc5843_arch_reset(), HMC5843_I2C_DEV, HMC5843_TIMEOUT, i2c_idle(), i2c_submit(), Hmc5843::i2c_trans, I2CIdle, I2CTransPending, I2CTransRunning, I2CTransRx, I2CTransTx, Hmc5843::initialized, i2c_transaction::len_r, i2c_transaction::len_w, send_config(), i2c_transaction::status, Hmc5843::timeout, TRUE, and i2c_transaction::type.
Referenced by hmc5843_module_periodic(), and imu_periodic().
struct Hmc5843 hmc5843 |
Definition at line 9 of file hmc5843.c.
Referenced by hmc5843_idle_task(), hmc5843_init(), hmc5843_module_periodic(), hmc5843_periodic(), and send_config().