kopia lustrzana https://github.com/jgromes/RadioLib
Merge pull request #127 from naggie/delay
Swap delayMicroseconds() to delay where appropriatepull/142/head
commit
26abfe661e
|
@ -101,7 +101,7 @@ int16_t RF69::begin(float freq, float br, float freqDev, float rxBw, int8_t powe
|
|||
void RF69::reset() {
|
||||
Module::pinMode(_mod->getRst(), OUTPUT);
|
||||
Module::digitalWrite(_mod->getRst(), HIGH);
|
||||
delayMicroseconds(100);
|
||||
delay(1);
|
||||
Module::digitalWrite(_mod->getRst(), LOW);
|
||||
delay(10);
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ int16_t SX126x::reset(bool verify) {
|
|||
// run the reset sequence
|
||||
Module::pinMode(_mod->getRst(), OUTPUT);
|
||||
Module::digitalWrite(_mod->getRst(), LOW);
|
||||
delayMicroseconds(150);
|
||||
delay(1);
|
||||
Module::digitalWrite(_mod->getRst(), HIGH);
|
||||
|
||||
// return immediately when verification is disabled
|
||||
|
@ -364,7 +364,7 @@ int16_t SX126x::sleep(bool retainConfig) {
|
|||
int16_t state = SPIwriteCommand(SX126X_CMD_SET_SLEEP, &sleepMode, 1, false);
|
||||
|
||||
// wait for SX126x to safely enter sleep mode
|
||||
delayMicroseconds(500);
|
||||
delay(1);
|
||||
|
||||
return(state);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ int16_t SX1272::beginFSK(float freq, float br, float rxBw, float freqDev, int8_t
|
|||
void SX1272::reset() {
|
||||
Module::pinMode(_mod->getRst(), OUTPUT);
|
||||
Module::digitalWrite(_mod->getRst(), HIGH);
|
||||
delayMicroseconds(100);
|
||||
delay(1);
|
||||
Module::digitalWrite(_mod->getRst(), LOW);
|
||||
delay(5);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ int16_t SX1278::beginFSK(float freq, float br, float freqDev, float rxBw, int8_t
|
|||
void SX1278::reset() {
|
||||
Module::pinMode(_mod->getRst(), OUTPUT);
|
||||
Module::digitalWrite(_mod->getRst(), LOW);
|
||||
delayMicroseconds(100);
|
||||
delay(1);
|
||||
Module::digitalWrite(_mod->getRst(), HIGH);
|
||||
delay(5);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ int16_t XBee::begin(long speed) {
|
|||
void XBee::reset() {
|
||||
pinMode(_mod->getRst(), OUTPUT);
|
||||
digitalWrite(_mod->getRst(), LOW);
|
||||
delayMicroseconds(200);
|
||||
delay(1);
|
||||
digitalWrite(_mod->getRst(), HIGH);
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ int16_t XBeeSerial::begin(long speed) {
|
|||
void XBeeSerial::reset() {
|
||||
pinMode(_mod->getRst(), OUTPUT);
|
||||
digitalWrite(_mod->getRst(), LOW);
|
||||
delayMicroseconds(200);
|
||||
delay(1);
|
||||
digitalWrite(_mod->getRst(), HIGH);
|
||||
pinMode(_mod->getRst(), INPUT);
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ int16_t nRF24::startTransmit(uint8_t* data, size_t len, uint8_t addr) {
|
|||
|
||||
// CE high to start transmitting
|
||||
digitalWrite(_mod->getRst(), HIGH);
|
||||
delayMicroseconds(10);
|
||||
delay(1);
|
||||
digitalWrite(_mod->getRst(), LOW);
|
||||
|
||||
return(state);
|
||||
|
@ -199,7 +199,7 @@ int16_t nRF24::startReceive() {
|
|||
digitalWrite(_mod->getRst(), HIGH);
|
||||
|
||||
// wait to enter Rx state
|
||||
delayMicroseconds(130);
|
||||
delay(1);
|
||||
|
||||
return(state);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue