File tree 2 files changed +4
-3
lines changed
hardware/arduino/sam/cores/arduino/USB
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ ARDUINO 1.5.2 BETA - 2012.01.23
22
22
* sam: added CANRX1/CANTX1 pins 88/89 (same physical pin for 66/53)
23
23
* sam: fixed analogWrite when used in very thight write loops (V.Dorrich)
24
24
* sam: fixed USBSerial.write() while sending big buffers (Bill Dreschel)
25
+ * sam: USBSerial receive buffer size is now 512 (PeterVH)
25
26
26
27
[libraries]
27
28
* sam: Added Servo library
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ void Serial_::accept(void)
157
157
{
158
158
ring_buffer *buffer = &cdc_rx_buffer;
159
159
uint32_t c = USBD_Recv (CDC_RX);
160
- uint32_t i = (uint32_t )(buffer->head +1 ) % SERIAL_BUFFER_SIZE ;
160
+ uint32_t i = (uint32_t )(buffer->head +1 ) % CDC_SERIAL_BUFFER_SIZE ;
161
161
162
162
// if we should be storing the received character into the location
163
163
// just before the tail (meaning that the head would advance to the
@@ -172,7 +172,7 @@ void Serial_::accept(void)
172
172
int Serial_::available (void )
173
173
{
174
174
ring_buffer *buffer = &cdc_rx_buffer;
175
- return (unsigned int )(SERIAL_BUFFER_SIZE + buffer->head - buffer->tail ) % SERIAL_BUFFER_SIZE ;
175
+ return (unsigned int )(CDC_SERIAL_BUFFER_SIZE + buffer->head - buffer->tail ) % CDC_SERIAL_BUFFER_SIZE ;
176
176
}
177
177
178
178
int Serial_::peek (void )
@@ -201,7 +201,7 @@ int Serial_::read(void)
201
201
else
202
202
{
203
203
unsigned char c = buffer->buffer [buffer->tail ];
204
- buffer->tail = (unsigned int )(buffer->tail + 1 ) % SERIAL_BUFFER_SIZE ;
204
+ buffer->tail = (unsigned int )(buffer->tail + 1 ) % CDC_SERIAL_BUFFER_SIZE ;
205
205
return c;
206
206
}
207
207
}
You can’t perform that action at this time.
0 commit comments