Better Reply structs

This commit is contained in:
Philippe Teuwen
2019-04-17 23:44:48 +02:00
parent 64eb93c9c4
commit 533667ea6d
57 changed files with 725 additions and 718 deletions

View File

@@ -38,8 +38,8 @@ void usart_close(void) {
}
*/
static uint8_t us_inbuf[sizeof(UsbCommand)];
static uint8_t us_outbuf[sizeof(UsbCommand)];
static uint8_t us_inbuf[sizeof(UsbCommandOLD)];
static uint8_t us_outbuf[sizeof(UsbCommandOLD)];
/*
// transfer from client to device
inline int16_t usart_readbuffer(uint8_t *data) {
@@ -63,7 +63,7 @@ inline int16_t usart_readbuffer(uint8_t *data) {
// Check if the first PDC bank is free
if (pUS1->US_RCR == 0) {
pUS1->US_RPR = (uint32_t)data;
pUS1->US_RCR = sizeof(UsbCommand);
pUS1->US_RCR = sizeof(UsbCommandOLD);
pUS1->US_PTCR = AT91C_PDC_RXTEN | AT91C_PDC_TXTEN;
check = 0;
return 2;