aboutsummaryrefslogtreecommitdiff
path: root/Projects/Benito/Benito.c
diff options
context:
space:
mode:
authorDean Camera <[email protected]>2010-05-26 13:26:10 +0000
committerDean Camera <[email protected]>2010-05-26 13:26:10 +0000
commit8d993afc5388c5f3d0ff568c607f7fed6bb7390e (patch)
tree6ac1c5a0ca4a7c72bd4ca2ed2e137d9c0549da30 /Projects/Benito/Benito.c
parent885170f5b456116d7c40570c36342193a30ed886 (diff)
downloadqmk_firmware-8d993afc5388c5f3d0ff568c607f7fed6bb7390e.tar.gz
qmk_firmware-8d993afc5388c5f3d0ff568c607f7fed6bb7390e.zip
Replace ring buffer library in Benito and USBtoSerial projects with the new lightweight ring buffer header to improve reliability.
Diffstat (limited to 'Projects/Benito/Benito.c')
-rw-r--r--Projects/Benito/Benito.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Projects/Benito/Benito.c b/Projects/Benito/Benito.c
index 1fceec1f65..3b3a398601 100644
--- a/Projects/Benito/Benito.c
+++ b/Projects/Benito/Benito.c
@@ -82,7 +82,7 @@ int main(void)
{
SetupHardware();
- Buffer_Initialize(&Tx_Buffer);
+ RingBuffer_InitBuffer(&Tx_Buffer);
sei();
@@ -98,9 +98,9 @@ int main(void)
}
/* Echo bytes from the target to the host via the virtual serial port */
- while (Tx_Buffer.Elements > 0)
+ while (Tx_Buffer.Count)
{
- CDC_Device_SendByte(&VirtualSerial_CDC_Interface, Buffer_GetElement(&Tx_Buffer));
+ CDC_Device_SendByte(&VirtualSerial_CDC_Interface, RingBuffer_Remove(&Tx_Buffer));
LEDs_TurnOnLEDs(LEDMASK_RX);
PulseMSRemaining.RxLEDPulse = TX_RX_LED_PULSE_MS;
@@ -240,7 +240,7 @@ ISR(USART1_RX_vect, ISR_BLOCK)
uint8_t ReceivedByte = UDR1;
if (USB_DeviceState == DEVICE_STATE_Configured)
- Buffer_StoreElement(&Tx_Buffer, ReceivedByte);
+ RingBuffer_Insert(&Tx_Buffer, ReceivedByte);
}
/** Event handler for the CDC Class driver Host-to-Device Line Encoding Changed event.