mirror of
https://github.com/arduino/Arduino.git
synced 2025-04-05 21:40:24 +02: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 SLAVEREADY 7 // handshake pin
|
||||||
#define WIFILED 9 // led on wifi shield
|
#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)
|
#define DELAY_TRANSFER() DELAY_SPI(10)
|
||||||
|
|
||||||
void SpiDrv::begin()
|
void SpiDrv::begin()
|
||||||
|
@ -15,7 +15,7 @@ extern "C" {
|
|||||||
#define SLAVEREADY 7 // handshake pin
|
#define SLAVEREADY 7 // handshake pin
|
||||||
#define WIFILED 9 // led on wifi shield
|
#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)
|
#define DELAY_TRANSFER() DELAY_SPI(10)
|
||||||
|
|
||||||
void SpiDrv::begin()
|
void SpiDrv::begin()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user