projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix XPLAINBridge project discarding characters from the USB interface due to a double...
[pub/USBasp.git]
/
Projects
/
Benito
/
Benito.c
diff --git
a/Projects/Benito/Benito.c
b/Projects/Benito/Benito.c
index
ac1e064
..
88005ee
100644
(file)
--- a/
Projects/Benito/Benito.c
+++ b/
Projects/Benito/Benito.c
@@
-127,13
+127,14
@@
int main(void)
LEDs_TurnOffLEDs(LEDMASK_RX);
/* Check if the receive buffer flush period has expired */
LEDs_TurnOffLEDs(LEDMASK_RX);
/* Check if the receive buffer flush period has expired */
- if (!(--FlushPeriodRemaining) || (Tx_Buffer.Count > 200))
+ RingBuff_Count_t BufferCount = RingBuffer_GetCount(&Tx_Buffer);
+ if (!(--FlushPeriodRemaining) || (BufferCount > 200))
{
/* Echo bytes from the target to the host via the virtual serial port */
{
/* Echo bytes from the target to the host via the virtual serial port */
- if (
Tx_Buffer.
Count)
+ if (
Buffer
Count)
{
{
- while (
Tx_Buffer.Count
)
- CDC_Device_SendByte(&VirtualSerial_CDC_Interface, RingBuffer_
Atomic
Remove(&Tx_Buffer));
+ while (
BufferCount--
)
+ CDC_Device_SendByte(&VirtualSerial_CDC_Interface, RingBuffer_Remove(&Tx_Buffer));
LEDs_TurnOnLEDs(LEDMASK_RX);
PulseMSRemaining.RxLEDPulse = TX_RX_LED_PULSE_MS;
LEDs_TurnOnLEDs(LEDMASK_RX);
PulseMSRemaining.RxLEDPulse = TX_RX_LED_PULSE_MS;