17 #define MM_SENDING_REQ 2
18 #define MM_WAITING_EOC 3
20 #define MM_READING_RES 5
21 #define MM_DATA_AVAILABLE 6
24 #define SSP_CLOCK 468750
27 #define SSP_DDS 0x07 << 0
28 #define SSP_FRF 0x00 << 4
29 #define SSP_CPOL 0x00 << 6
30 #define SSP_CPHA 0x00 << 7
31 #define SSP_SCR 0x0F << 8
34 #define SSP_LBM 0x00 << 0
35 #define SSP_SSE 0x00 << 1
36 #define SSP_MS 0x00 << 2
37 #define SSP_SOD 0x00 << 3
40 #define SS_IODIR IO0DIR
41 #define SS_IOSET IO0SET
42 #define SS_IOCLR IO0CLR
44 #define SSPCR0_VAL (SSP_DDS | SSP_FRF | SSP_CPOL | SSP_CPHA | SSP_SCR )
45 #define SSPCR1_VAL (SSP_LBM | SSP_SSE | SSP_MS | SSP_SOD )
47 #define SSP_PINSEL1_SCK (2<<2)
48 #define SSP_PINSEL1_MISO (2<<4)
49 #define SSP_PINSEL1_MOSI (2<<6)
51 #define SSP_Enable() SetBit(SSPCR1, SSE);
52 #define SSP_Disable() ClearBit(SSPCR1, SSE);
53 #define SSP_EnableRxi() SetBit(SSPIMSC, RXIM)
54 #define SSP_DisableRxi() ClearBit(SSPIMSC, RXIM)
55 #define SSP_EnableTxi() SetBit(SSPIMSC, TXIM)
56 #define SSP_DisableTxi() ClearBit(SSPIMSC, TXIM)
57 #define SSP_EnableRti() SetBit(SSPIMSC, RTIM);
58 #define SSP_DisableRti() ClearBit(SSPIMSC, RTIM);
59 #define SSP_ClearRti() SetBit(SSPICR, RTIC);
volatile uint8_t micromag_status
volatile int16_t micromag_values[MM_NB_AXIS]
void micromag_reset(void)
void micromag_periodic(void)
void micromag_event(void)