mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-05-12 11:43:16 -04:00
remove a reundant MIN(), and reduce the buffer. We really don't need 16k for this. It seems to work reliably at full speed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16491 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2aa48042e5
commit
8abe9cffe4
1 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#ifdef USB_SERIAL
|
||||
|
||||
#define BUFFER_SIZE 16384 /* No larger, because of controller limitations */
|
||||
#define BUFFER_SIZE 512 /* Max 16k because of controller limitations */
|
||||
static unsigned char _send_buffer[BUFFER_SIZE] __attribute__((aligned(32)));
|
||||
static unsigned char* send_buffer;
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ void usb_serial_send(unsigned char *data,int length)
|
|||
/* current buffer wraps, so new data can't */
|
||||
int available_space = BUFFER_SIZE - buffer_length;
|
||||
length=MIN(length,available_space);
|
||||
memcpy(&send_buffer[(buffer_start+buffer_length)%BUFFER_SIZE],data,MIN(length,available_space));
|
||||
memcpy(&send_buffer[(buffer_start+buffer_length)%BUFFER_SIZE],data,length);
|
||||
buffer_length+=length;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue