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
mag_micromag_fw_hw.h File Reference
#include <stdlib.h>
#include "std.h"
#include "LPC21xx.h"
#include "mcu.h"
#include "mcu_periph/spi.h"
#include "generated/airframe.h"
+ Include dependency graph for mag_micromag_fw_hw.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MM_DIVISOR_128   2
 
#define MM_DIVISOR_256   3
 
#define MM_DIVISOR_512   4
 
#define MM_DIVISOR_1024   5
 
#define MM_DIVISOR   MM_DIVISOR_512
 
#define MmSelect()   SetBit(MM_SS_IOCLR,MM_SS_PIN)
 
#define MmUnselect()   SetBit(MM_SS_IOSET,MM_SS_PIN)
 
#define MmReset()   SetBit(MM_RESET_IOCLR,MM_RESET_PIN)
 
#define MmSet()   SetBit(MM_RESET_IOSET,MM_RESET_PIN)
 
#define MmOnSpiIt()
 
#define MmSendReq()
 
#define MmReadRes()
 

Functions

void micromag_hw_init (void)
 

Variables

volatile uint8_t micromag_cur_axe
 

Macro Definition Documentation

#define MM_DIVISOR   MM_DIVISOR_512

Definition at line 20 of file mag_micromag_fw_hw.h.

#define MM_DIVISOR_1024   5

Definition at line 18 of file mag_micromag_fw_hw.h.

#define MM_DIVISOR_128   2

Definition at line 15 of file mag_micromag_fw_hw.h.

#define MM_DIVISOR_256   3

Definition at line 16 of file mag_micromag_fw_hw.h.

#define MM_DIVISOR_512   4

Definition at line 17 of file mag_micromag_fw_hw.h.

#define MmOnSpiIt ( )

Definition at line 31 of file mag_micromag_fw_hw.h.

#define MmReadRes ( )
Value:
{ \
/* trigger 2 bytes read */ \
SSPDR = 0; \
SSPDR = 0; \
}
#define MM_READING_RES
Definition: micromag.h:18
#define MmSelect()
#define SpiClearRti()
Definition: spi_arch.h:84
volatile uint8_t micromag_status
Definition: micromag.c:3
#define SpiEnable()
Definition: spi_arch.h:68
#define SSPDR
Definition: LPC21xx.h:224
#define SpiEnableRti()
Definition: spi_arch.h:76

Definition at line 80 of file mag_micromag_fw_hw.h.

#define MmReset ( )    SetBit(MM_RESET_IOCLR,MM_RESET_PIN)

Definition at line 28 of file mag_micromag_fw_hw.h.

#define MmSelect ( )    SetBit(MM_SS_IOCLR,MM_SS_PIN)

Definition at line 25 of file mag_micromag_fw_hw.h.

#define MmSendReq ( )
Value:
{ \
uint8_t control_byte = (micromag_cur_axe+1) << 0 | MM_DIVISOR_1024 << 4; \
SSPDR = control_byte; \
}
#define MmReset()
#define MmSelect()
#define SpiClearRti()
Definition: spi_arch.h:84
volatile uint8_t micromag_status
Definition: micromag.c:3
#define SpiEnable()
Definition: spi_arch.h:68
#define MM_SENDING_REQ
Definition: micromag.h:15
#define MM_DIVISOR_1024
#define MmSet()
unsigned char uint8_t
Definition: types.h:14
#define SSPDR
Definition: LPC21xx.h:224
#define SpiEnableRti()
Definition: spi_arch.h:76
volatile uint8_t micromag_cur_axe
Definition: micromag_hw.c:25

Definition at line 68 of file mag_micromag_fw_hw.h.

#define MmSet ( )    SetBit(MM_RESET_IOSET,MM_RESET_PIN)

Definition at line 29 of file mag_micromag_fw_hw.h.

#define MmUnselect ( )    SetBit(MM_SS_IOSET,MM_SS_PIN)

Definition at line 26 of file mag_micromag_fw_hw.h.

Function Documentation

void micromag_hw_init ( void  )

Definition at line 41 of file mag_micromag_fw_hw.c.

Variable Documentation

volatile uint8_t micromag_cur_axe

Definition at line 25 of file micromag_hw.c.