Merge pull request #127 from naggie/delay

Swap delayMicroseconds() to delay where appropriate
pull/142/head
Jan Gromeš 2020-03-16 13:50:39 +01:00 zatwierdzone przez GitHub
commit 26abfe661e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
6 zmienionych plików z 9 dodań i 9 usunięć

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -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);
}