Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
hmc5843.h File Reference
#include "std.h"
#include "mcu_periph/i2c.h"
#include "peripherals/hmc5843_arch.h"
#include <string.h>
+ Include dependency graph for hmc5843.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Hmc5843
 

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
 
#define MagEvent(_m_handler)
 

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
 

Macro Definition Documentation

#define HMC5843_ADDR   0x3C

Definition at line 55 of file hmc5843.h.

Referenced by hmc5843_init(), main_event_task(), main_periodic_task(), and send_config().

#define HMC5843_REG_CFGA   0x00

Definition at line 58 of file hmc5843.h.

Referenced by main_periodic_task(), and send_config().

#define HMC5843_REG_CFGB   0x01

Definition at line 59 of file hmc5843.h.

Referenced by main_periodic_task(), and send_config().

#define HMC5843_REG_DATXL   0x04

Definition at line 62 of file hmc5843.h.

#define HMC5843_REG_DATXM   0x03

Definition at line 61 of file hmc5843.h.

#define HMC5843_REG_DATYL   0x06

Definition at line 64 of file hmc5843.h.

#define HMC5843_REG_DATYM   0x05

Definition at line 63 of file hmc5843.h.

#define HMC5843_REG_DATZL   0x08

Definition at line 66 of file hmc5843.h.

#define HMC5843_REG_DATZM   0x07

Definition at line 65 of file hmc5843.h.

#define HMC5843_REG_IDA   0x0A

Definition at line 68 of file hmc5843.h.

#define HMC5843_REG_IDB   0x0B

Definition at line 69 of file hmc5843.h.

#define HMC5843_REG_IDC   0x0C

Definition at line 70 of file hmc5843.h.

#define HMC5843_REG_MODE   0x02

Definition at line 60 of file hmc5843.h.

Referenced by main_periodic_task(), and send_config().

#define HMC5843_REG_STATUS   0x09

Definition at line 67 of file hmc5843.h.

#define MagEvent (   _m_handler)
Value:
{ \
_m_handler(); \
} \
}
void hmc5843_idle_task(void)
Definition: hmc5843.c:60
if(PrimarySpektrumState.SpektrumTimer)--PrimarySpektrumState.SpektrumTimer
struct Hmc5843 hmc5843
Definition: hmc5843.c:9
uint8_t data_available
Definition: hmc5843.h:34

Definition at line 74 of file hmc5843.h.

Function Documentation

void hmc5843_arch_init ( void  )

Definition at line 24 of file hmc5843_arch.c.

Referenced by hmc5843_init().

+ Here is the caller graph for this function:

void hmc5843_arch_reset ( void  )

Definition at line 47 of file hmc5843_arch.c.

Referenced by hmc5843_periodic().

+ Here is the caller graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct Hmc5843 hmc5843