projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor documentation improvements.
[pub/USBasp.git]
/
Projects
/
Benito
/
Benito.c
diff --git
a/Projects/Benito/Benito.c
b/Projects/Benito/Benito.c
index
c6cbf02
..
4c96450
100644
(file)
--- a/
Projects/Benito/Benito.c
+++ b/
Projects/Benito/Benito.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
0
.
+ Copyright (C) Dean Camera, 201
1
.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 201
0
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
1
Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-37,7
+37,10
@@
#include "Benito.h"
/** Circular buffer to hold data from the serial port before it is sent to the host. */
#include "Benito.h"
/** Circular buffer to hold data from the serial port before it is sent to the host. */
-RingBuff_t USARTtoUSB_Buffer;
+RingBuffer_t USARTtoUSB_Buffer;
+
+/** Underlying data buffer for \ref USARTtoUSB_Buffer, where the stored bytes are located. */
+uint8_t USARTtoUSB_Buffer_Data[128];
/** Pulse generation counters to keep track of the number of milliseconds remaining for each pulse type */
volatile struct
/** Pulse generation counters to keep track of the number of milliseconds remaining for each pulse type */
volatile struct
@@
-85,7
+88,7
@@
int main(void)
{
SetupHardware();
{
SetupHardware();
- RingBuffer_InitBuffer(&USARTtoUSB_Buffer);
+ RingBuffer_InitBuffer(&USARTtoUSB_Buffer
, USARTtoUSB_Buffer_Data, sizeof(USARTtoUSB_Buffer_Data)
);
sei();
sei();
@@
-126,7
+129,7
@@
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 */
-
RingBuff_Count
_t BufferCount = RingBuffer_GetCount(&USARTtoUSB_Buffer);
+
uint16
_t BufferCount = RingBuffer_GetCount(&USARTtoUSB_Buffer);
if (!(--FlushPeriodRemaining) || (BufferCount > 200))
{
/* Echo bytes from the target to the host via the virtual serial port */
if (!(--FlushPeriodRemaining) || (BufferCount > 200))
{
/* Echo bytes from the target to the host via the virtual serial port */