yoshinari kou
/
WW_SD_send_IRVer2
Send IR data from SD card. I changed Chip Select signal timing.
Diff: wwChipSelect.cpp
- Revision:
- 1:372b09a39fa4
- Parent:
- 0:da2f4475a464
--- a/wwChipSelect.cpp Wed Jul 13 14:25:47 2011 +0000 +++ b/wwChipSelect.cpp Thu Sep 01 09:45:40 2011 +0000 @@ -5,15 +5,25 @@ //2010/10/03 #include "wwChipSelect.h" +//#define NORMAL //if you want to use normal chipselect, you should enable this code. wwChipSelect :: wwChipSelect(PinName cs): ChipSelect(cs){ } -void wwChipSelect :: wwCSwrite(int ch){ +void wwChipSelect :: wwCSwrite(int ch){ + +#ifdef NORMAL + if(ch == 0){//reset code + ChipSelect.write(1); + }else{ + ChipSelect.write(0); + } + +#else //start ChipSelect.write(1); - wait_us(20); + wait_us(30); ChipSelect.write(0); @@ -36,6 +46,8 @@ wait_us(20);//106 ChipSelect.write(1); - + + wait_us(30); +#endif }