Alex Borisevich / Mbed 2 deprecated OpenBCI

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PlatformSPI.h Source File

PlatformSPI.h

00001 // interface for SPI implemented with mbed framework
00002 
00003 #ifndef __PlatformSPI__
00004 #define __PlatformSPI__
00005 
00006 #define DSPI_MODE0  0   // CKP = 0 CKE = 1 ====> POL=0 PHA=0
00007 #define DSPI_MODE1  1   // CKP = 0 CKE = 0 ====> POL=0 PHA=1
00008 #define DSPI_MODE2  2   // CKP = 1 CKE = 1 ====> POL=1 PHA=0
00009 #define DSPI_MODE3  3   // CKP = 1 CKE = 0 ====> POL=1 PHA=1
00010 
00011 class DSPI0 {
00012 public:
00013   void begin();
00014   void setSpeed(int speed_hz); 
00015   void setMode(int mode); 
00016   int transfer(int data);
00017 private:
00018 
00019 };
00020 
00021 #endif