mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-04-07 07:25:22 +00:00
Add a ring buffer to the serial repeater. Uncompiled on the STM32
platform.
This commit is contained in:
parent
6161d298f7
commit
99ac6146d9
5 changed files with 96 additions and 53 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2016 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2016,2017 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -54,6 +54,20 @@ int CSerialPort::availableInt(uint8_t n)
|
|||
}
|
||||
}
|
||||
|
||||
int CSerialPort::availableForWriteInt(uint8_t n)
|
||||
{
|
||||
switch (n) {
|
||||
case 1U:
|
||||
return Serial.availableForWrite();
|
||||
case 2U:
|
||||
return Serial2.availableForWrite();
|
||||
case 3U:
|
||||
return Serial3.availableForWrite();
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t CSerialPort::readInt(uint8_t n)
|
||||
{
|
||||
switch (n) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue