Compare commits
4 Commits
8546142b6c
...
202f7e24d6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
202f7e24d6 | ||
|
|
6cd290d964 | ||
| 53db7d6e1c | |||
|
|
cae484fb53 |
@ -347,22 +347,6 @@ int LoRaClass::read()
|
||||
return readRegister(REG_FIFO);
|
||||
}
|
||||
|
||||
int LoRaClass::read(uint8_t *buffer, size_t len)
|
||||
{
|
||||
if(!buffer) return 0;
|
||||
|
||||
size_t nbread = 0;
|
||||
while(nbread < len && available())
|
||||
{
|
||||
int c = read();
|
||||
if(c == -1) break;
|
||||
|
||||
buffer[nbread++] = c;
|
||||
}
|
||||
|
||||
return nbread;
|
||||
}
|
||||
|
||||
int LoRaClass::peek()
|
||||
{
|
||||
if (!available()) {
|
||||
|
||||
@ -54,7 +54,6 @@ public:
|
||||
// from Stream
|
||||
virtual int available();
|
||||
virtual int read();
|
||||
virtual int read(uint8_t *buffer, size_t len);
|
||||
virtual int peek();
|
||||
virtual void flush();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user