Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
hmc5843.c File Reference
#include "peripherals/hmc5843.h"
#include "mcu_periph/i2c.h"
#include "led.h"
Include dependency graph for hmc5843.c:

Go to the source code of this file.

Macros

#define HMC5843_TIMEOUT   100
#define bswap_16(x)
#define HMC5843_I2C_DEV   i2c2

Functions

void exti9_5_irq_handler (void)
void hmc5843_init (void)
static void send_config (void)
void hmc5843_idle_task (void)
void hmc5843_periodic (void)

Variables

struct Hmc5843 hmc5843

Macro Definition Documentation

◆ bswap_16

#define bswap_16 ( x)
Value:
((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8))

Definition at line 7 of file hmc5843.c.

Referenced by hmc5843_idle_task().

◆ HMC5843_I2C_DEV

#define HMC5843_I2C_DEV   i2c2

Definition at line 13 of file hmc5843.c.

Referenced by hmc5843_idle_task(), hmc5843_periodic(), and send_config().

◆ HMC5843_TIMEOUT

#define HMC5843_TIMEOUT   100

Definition at line 5 of file hmc5843.c.

Referenced by hmc5843_periodic().

Function Documentation

◆ exti9_5_irq_handler()

void exti9_5_irq_handler ( void )

◆ hmc5843_idle_task()

void hmc5843_idle_task ( void )

Definition at line 60 of file hmc5843.c.

References bswap_16, hmc5843, HMC5843_I2C_DEV, i2c_idle(), i2c_submit(), I2CIdle, I2CTransFailed, I2CTransPending, I2CTransRunning, I2CTransRx, I2CTransSuccess, and I2CTransTx.

Referenced by hmc5843_module_event().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hmc5843_init()

void hmc5843_init ( void )

Definition at line 16 of file hmc5843.c.

References hmc5843, HMC5843_ADDR, hmc5843_arch_init(), and I2CTransSuccess.

Referenced by hmc5843_module_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hmc5843_periodic()

void hmc5843_periodic ( void )

Definition at line 103 of file hmc5843.c.

References hmc5843, hmc5843_arch_reset(), HMC5843_I2C_DEV, HMC5843_TIMEOUT, i2c_idle(), i2c_submit(), I2CIdle, I2CTransPending, I2CTransRunning, I2CTransRx, I2CTransTx, and send_config().

Referenced by hmc5843_module_periodic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_config()

void send_config ( void )
static

Definition at line 27 of file hmc5843.c.

References hmc5843, HMC5843_I2C_DEV, HMC5843_REG_CFGA, HMC5843_REG_CFGB, HMC5843_REG_MODE, i2c_submit(), I2CTransPending, and I2CTransTx.

Referenced by hmc5843_periodic().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ hmc5843

struct Hmc5843 hmc5843