Lots of small tweaks.

This commit is contained in:
Jonathan Naylor 2016-01-18 18:37:04 +00:00
parent 11b18207ff
commit 8f9744c0ec
8 changed files with 61 additions and 53 deletions

View file

@ -58,10 +58,10 @@ uint16_t CSerialRB::getData() const
return m_length - m_tail + m_head;
}
void CSerialRB::put(uint8_t c)
bool CSerialRB::put(uint8_t c)
{
if (m_full)
return;
return false;
m_buffer[m_head] = c;
@ -71,6 +71,8 @@ void CSerialRB::put(uint8_t c)
if (m_head == m_tail)
m_full = true;
return true;
}
uint8_t CSerialRB::peek() const