28 #define MAX1168_NB_CHAN 8
30 #ifndef MAX1168_SLAVE_IDX
31 #define MAX1168_SLAVE_IDX SPI_SLAVE0
34 #ifndef MAX1168_SPI_DEV
35 #define MAX1168_SPI_DEV spi1
40 #ifndef MAX1168_CONF_CHANNEL
41 #define MAX1168_CONF_CHANNEL 0x7
43 #ifndef MAX1168_CONF_SCAN
44 #define MAX1168_CONF_SCAN 0x1
46 #ifndef MAX1168_CONF_REF
47 #define MAX1168_CONF_REF 0x0
49 #ifndef MAX1168_CONF_CLOCK
50 #define MAX1168_CONF_CLOCK 0x1
53 #define MAX1168_CONF_CR ((MAX1168_CONF_CHANNEL<<5)|(MAX1168_CONF_SCAN<<3)|(MAX1168_CONF_REF<<1)|(MAX1168_CONF_CLOCK))
59 #define MAX1168_IDLE 0
60 #define MAX1168_SENDING_REQ 1
61 #define MAX1168_GOT_EOC 2
62 #define MAX1168_READING_RES 3
63 #define MAX1168_DATA_AVAILABLE 4
68 #define Max1168Periodic() { \
69 if (max1168_status == MAX1168_IDLE) { \
75 #include "peripherals/max1168_arch.h"
volatile uint8_t max1168_status
void max1168_arch_init(void)
uint16_t max1168_values[MAX1168_NB_CHAN]
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.