MCPcopy Create free account
hub / github.com/PricelessToolkit/MailBoxGuard / peek

Method peek

Code/Arduino_libraries/LoRa/LoRa.cpp:339–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339int LoRaClass::peek()
340{
341 if (!available()) {
342 return -1;
343 }
344
345 // store current FIFO address
346 int currentAddress = readRegister(REG_FIFO_ADDR_PTR);
347
348 // read
349 uint8_t b = readRegister(REG_FIFO);
350
351 // restore FIFO address
352 writeRegister(REG_FIFO_ADDR_PTR, currentAddress);
353
354 return b;
355}
356
357void LoRaClass::flush()
358{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected