Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
lisa_test_hmc5843.c File Reference
#include <stm32/gpio.h>
#include <stm32/flash.h>
#include <stm32/misc.h>
#include <stm32/exti.h>
#include <stm32/spi.h>
#include "mcu.h"
#include "mcu_periph/sys_time.h"
#include "subsystems/datalink/downlink.h"
#include "std.h"
#include "led.h"
#include "mcu_periph/uart.h"
#include "mcu_periph/i2c.h"
#include "peripherals/hmc5843.h"
#include "my_debug_servo.h"
#include "math/pprz_algebra_int.h"
+ Include dependency graph for lisa_test_hmc5843.c:

Go to the source code of this file.

Macros

#define INITIALIZED   6
 

Functions

static void main_init (void)
 
static void main_periodic_task (void)
 
static void main_event_task (void)
 
static void main_init_hw (void)
 
static void send_config (void)
 
void exti9_5_irq_handler (void)
 
int main (void)
 

Variables

static struct i2c_transaction i2c_trans
 
struct i2c_transaction t1
 
struct i2c_transaction t2
 
static uint8_t mag_state = 0
 
static volatile uint8_t mag_ready_for_read = FALSE
 
static uint8_t reading_mag = FALSE
 

Macro Definition Documentation

#define INITIALIZED   6

Definition at line 60 of file lisa_test_hmc5843.c.

Referenced by exti9_5_irq_handler(), main_event_task(), and main_periodic_task().

Function Documentation

void exti9_5_irq_handler ( void  )

Definition at line 266 of file lisa_test_hmc5843.c.

References INITIALIZED, mag_ready_for_read, mag_state, RESET, and TRUE.

int main ( void  )

Definition at line 67 of file lisa_test_hmc5843.c.

References main_event_task(), main_init(), main_periodic_task(), and sys_time_check_and_ack_timer().

+ Here is the call graph for this function:

static void main_event_task ( void  )
inlinestatic
static void main_init ( void  )
inlinestatic

Definition at line 79 of file lisa_test_hmc5843.c.

References main_init_hw(), mcu_init(), PERIODIC_FREQUENCY, and sys_time_register_timer().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void main_init_hw ( void  )
inlinestatic

Definition at line 226 of file lisa_test_hmc5843.c.

References DEBUG_SERVO1_INIT, and DEBUG_SERVO2_INIT.

Referenced by main_init().

+ Here is the caller graph for this function:

static void main_periodic_task ( void  )
inlinestatic
static void send_config ( void  )
static

Definition at line 194 of file lisa_test_hmc5843.c.

References i2c_transaction::buf, HMC5843_ADDR, HMC5843_REG_CFGA, HMC5843_REG_CFGB, HMC5843_REG_MODE, i2c_submit(), i2c_trans, I2CTransTx, i2c_transaction::len_w, i2c_transaction::slave_addr, t1, t2, and i2c_transaction::type.

Referenced by main_periodic_task().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct i2c_transaction i2c_trans
static

Definition at line 56 of file lisa_test_hmc5843.c.

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

volatile uint8_t mag_ready_for_read = FALSE
static

Definition at line 62 of file lisa_test_hmc5843.c.

Referenced by exti9_5_irq_handler(), and main_event_task().

uint8_t mag_state = 0
static

Definition at line 61 of file lisa_test_hmc5843.c.

Referenced by exti9_5_irq_handler(), main_event_task(), and main_periodic_task().

uint8_t reading_mag = FALSE
static

Definition at line 63 of file lisa_test_hmc5843.c.

Referenced by main_event_task().

struct i2c_transaction t1

Definition at line 57 of file lisa_test_hmc5843.c.

Referenced by send_config().

struct i2c_transaction t2

Definition at line 58 of file lisa_test_hmc5843.c.

Referenced by baro_ms5611_event(), and send_config().