Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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
Generated on Wed Jul 20 2022 12:01:51 by
1.7.2