mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
WiFi librari: SPI delay is computed based on F_CPU constant
This commit is contained in:
parent
a2482734b5
commit
1ddf6136af
@ -15,7 +15,7 @@ extern "C" {
|
||||
#define SLAVEREADY 7 // handshake pin
|
||||
#define WIFILED 9 // led on wifi shield
|
||||
|
||||
#define DELAY_SPI(X) { int ii=0; do { asm volatile("nop"); } while (++ii < X); }
|
||||
#define DELAY_SPI(X) { int ii=0; do { asm volatile("nop"); } while (++ii < (X*F_CPU/16000000)); }
|
||||
#define DELAY_TRANSFER() DELAY_SPI(10)
|
||||
|
||||
void SpiDrv::begin()
|
||||
|
@ -15,7 +15,7 @@ extern "C" {
|
||||
#define SLAVEREADY 7 // handshake pin
|
||||
#define WIFILED 9 // led on wifi shield
|
||||
|
||||
#define DELAY_SPI(X) { int ii=0; do { asm volatile("nop"); } while (++ii < X*6); }
|
||||
#define DELAY_SPI(X) { int ii=0; do { asm volatile("nop"); } while (++ii < (X*F_CPU/16000000)); }
|
||||
#define DELAY_TRANSFER() DELAY_SPI(10)
|
||||
|
||||
void SpiDrv::begin()
|
||||
|
Loading…
Reference in New Issue
Block a user