This commit is contained in:
Pawel Spychalski
2017-12-01 12:20:41 +01:00
parent 1986f0961b
commit 52feecbee8
3 changed files with 8 additions and 40 deletions

View File

@@ -60,8 +60,7 @@ LoRaClass::LoRaClass() :
_implicitHeaderMode(0),
_onReceive(NULL)
{
// overide Stream timeout value
setTimeout(0);
}
int LoRaClass::begin(long frequency)
@@ -250,28 +249,6 @@ int LoRaClass::read()
return readRegister(REG_FIFO);
}
int LoRaClass::peek()
{
if (!available()) {
return -1;
}
// store current FIFO address
int currentAddress = readRegister(REG_FIFO_ADDR_PTR);
// read
uint8_t b = readRegister(REG_FIFO);
// restore FIFO address
writeRegister(REG_FIFO_ADDR_PTR, currentAddress);
return b;
}
void LoRaClass::flush()
{
}
void LoRaClass::onReceive(void(*callback)(int))
{
_onReceive = callback;