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" {
15
15
#define SLAVEREADY 7 // handshake pin
16
16
#define WIFILED 9 // led on wifi shield
17
17
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 ) ); }
19
19
#define DELAY_TRANSFER () DELAY_SPI(10 )
20
20
21
21
void SpiDrv::begin ()
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ extern "C" {
15
15
#define SLAVEREADY 7 // handshake pin
16
16
#define WIFILED 9 // led on wifi shield
17
17
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 ) ); }
19
19
#define DELAY_TRANSFER () DELAY_SPI(10 )
20
20
21
21
void SpiDrv::begin ()
You can’t perform that action at this time.
0 commit comments