projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Invert the logic for the VBUS power light in the AVRISP-MKII project for the USBTINY...
[pub/USBasp.git]
/
Projects
/
XPLAINBridge
/
XPLAINBridge.c
diff --git
a/Projects/XPLAINBridge/XPLAINBridge.c
b/Projects/XPLAINBridge/XPLAINBridge.c
index
2835481
..
7272fd8
100644
(file)
--- a/
Projects/XPLAINBridge/XPLAINBridge.c
+++ b/
Projects/XPLAINBridge/XPLAINBridge.c
@@
-120,10
+120,11
@@
void UARTBridge_Task(void)
return;
/* Read bytes from the USB OUT endpoint into the UART transmit buffer */
return;
/* Read bytes from the USB OUT endpoint into the UART transmit buffer */
- if (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface) && !(RingBuffer_IsFull(&USBtoUART_Buffer)))
+ int16_t ReceivedByte = CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface);
+ if (!(ReceivedByte < 0) && !(RingBuffer_IsFull(&USBtoUART_Buffer)))
RingBuffer_AtomicInsert(&USBtoUART_Buffer, CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface));
RingBuffer_AtomicInsert(&USBtoUART_Buffer, CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface));
- /* Check if the
software UART
flush timer has expired */
+ /* Check if the
UART receive buffer
flush timer has expired */
if (TIFR0 & (1 << TOV0))
{
TIFR0 |= (1 << TOV0);
if (TIFR0 & (1 << TOV0))
{
TIFR0 |= (1 << TOV0);