Fix serial port bug and several small changes

This commit is contained in:
Andy CA6JAU 2017-02-02 22:08:59 -03:00
parent 66fe701251
commit 39de090f19
30 changed files with 103 additions and 51 deletions

20
IO.cpp
View file

@ -78,6 +78,9 @@ void CIO::process()
void CIO::interrupt()
{
uint8_t bit = 0;
if (!m_started)
return;
if(m_tx) {
m_txBuffer.get(bit);
@ -98,6 +101,23 @@ void CIO::interrupt()
}
void CIO::start()
{
if (m_started)
return;
ifConf();
delay_rx();
setRX();
startInt();
m_started = true;
setMode();
}
void CIO::write(uint8_t* data, uint16_t length)
{
if (!m_started)