File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ extern "C" {
1515#define SLAVEREADY 7 // handshake pin
1616#define WIFILED 9 // led on wifi shield
1717
18- #define DELAY_SPI (X ) { int ii=0 ; do { asm volatile (" nop" ); } while (++ii < X ); }
18+ #define DELAY_SPI (X ) { int ii=0 ; do { asm volatile (" nop" ); } while (++ii < (X*F_CPU/ 16000000 ) ); }
1919#define DELAY_TRANSFER () DELAY_SPI(10 )
2020
2121void SpiDrv::begin ()
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ extern "C" {
1515#define SLAVEREADY 7 // handshake pin
1616#define WIFILED 9 // led on wifi shield
1717
18- #define DELAY_SPI (X ) { int ii=0 ; do { asm volatile (" nop" ); } while (++ii < X* 6 ); }
18+ #define DELAY_SPI (X ) { int ii=0 ; do { asm volatile (" nop" ); } while (++ii < (X*F_CPU/ 16000000 ) ); }
1919#define DELAY_TRANSFER () DELAY_SPI(10 )
2020
2121void SpiDrv::begin ()
You can’t perform that action at this time.
0 commit comments