MCPcopy Create free account
hub / github.com/MCUdude/MiniCore / peek

Method peek

avr/libraries/SoftwareSerial/src/SoftwareSerial.cpp:535–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533}
534
535int SoftwareSerial::peek()
536{
537 if (!isListening())
538 return -1;
539
540 // Empty buffer?
541 if (_receive_buffer_head == _receive_buffer_tail)
542 return -1;
543
544 // Read from "head"
545 return _receive_buffer[_receive_buffer_head];
546}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected