
White Wizard SPI Chip Select test program. I changed chip select signal timing.
main.cpp
- Committer:
- halfpitch
- Date:
- 2011-07-25
- Revision:
- 1:048ae028f72d
- Parent:
- 0:1d2148b42390
File content as of revision 1:048ae028f72d:
#include "mbed.h" #include "wwChipSelect.h" //Nest Egg Inc. //http://nestegg.jp/ //channel No must be A1 A2 A3 A4 //#define ch_num 0x05 //channel No 0101, depend on your SPI module setting. #define ch_num 0x0A //channel No 1010, depend on your SPI module setting. #define reset_ch 0x00 //channel No 0000, for reset. DigitalOut myled(LED1); int main() { wwChipSelect wwcs(p8); while(1) { wwcs.wwCSwrite(ch_num); myled = 1; wait(0.2); wwcs.wwCSwrite(reset_ch); myled = 0; wait(0.2); } }