30 #define ADS8344_SS_IODIR IO0DIR
31 #define ADS8344_SS_IOSET IO0SET
32 #define ADS8344_SS_IOCLR IO0CLR
33 #define ADS8344_SS_PIN 20
35 #define ADS8344Select() SetBit(ADS8344_SS_IOCLR,ADS8344_SS_PIN)
36 #define ADS8344Unselect() SetBit(ADS8344_SS_IOSET,ADS8344_SS_PIN)
41 #define POWER_MODE (1 << 1 | 1)
42 #define SGL_DIF 1 // Single ended
48 #if (PCLK == 15000000)
52 #if (PCLK == 30000000)
56 #if (PCLK == 60000000)
60 #error unknown PCLK frequency
66 #define SSP_DSS 0x07 << 0
67 #define SSP_FRF 0x00 << 4
68 #define SSP_CPOL 0x00 << 6
69 #define SSP_CPHA 0x00 << 7
70 #define SSP_SCR 0x0E << 8
73 #define SSP_LBM 0x00 << 0
74 #define SSP_SSE 0x00 << 1
75 #define SSP_MS 0x00 << 2
76 #define SSP_SOD 0x00 << 3
79 static void SPI1_ISR(
void) __attribute__((naked));
82 #warning "This driver should be updated to use the new SPI peripheral"
85 #define SPI1_VIC_SLOT 7
94 PINSEL1 |= 2 << 2 | 2 << 4 | 2 << 6;
static void SpiClearRti(struct spi_periph *p)
uint16_t ADS8344_values[NB_CHANNELS]
static void SpiEnableRti(struct spi_periph *p)
Architecture independent SPI (Serial Peripheral Interface) API.
static void read_values(void)
static void SPI1_ISR(void)
#define ADS8344Unselect()
static void send_request(void)
arch independent LED (Light Emitting Diodes) API