From ec1ecc020e8299a16cbddd2435ae1242c3fca15a Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 8 Apr 2014 21:51:11 +0200 Subject: [PATCH] OP-1033 attempt at fixing the f1 usb buffer configuration (current configuration has overlapping buffer that cause tx errors) --- flight/pios/stm32f10x/inc/usb_conf.h | 2 +- flight/pios/stm32f10x/pios_usbhook.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/flight/pios/stm32f10x/inc/usb_conf.h b/flight/pios/stm32f10x/inc/usb_conf.h index 898eb4034..cc4779e1b 100644 --- a/flight/pios/stm32f10x/inc/usb_conf.h +++ b/flight/pios/stm32f10x/inc/usb_conf.h @@ -39,7 +39,7 @@ /* EP1 (HID) */ /* rx/tx buffer base address */ #define ENDP1_TXADDR (0x60) -#define ENDP1_RXADDR (0x80) +#define ENDP1_RXADDR (0xA0) /* EP2 (CDC Call Control) */ /* rx/tx buffer base address */ diff --git a/flight/pios/stm32f10x/pios_usbhook.c b/flight/pios/stm32f10x/pios_usbhook.c index 3090aff2e..c1173db7d 100644 --- a/flight/pios/stm32f10x/pios_usbhook.c +++ b/flight/pios/stm32f10x/pios_usbhook.c @@ -200,12 +200,10 @@ static void PIOS_USBHOOK_Reset(void) #if defined(PIOS_INCLUDE_USB_HID) /* Initialize Endpoint 1 (HID) */ SetEPType(ENDP1, EP_INTERRUPT); - // TODO Validate that address and length are consistent SetEPTxAddr(ENDP1, ENDP1_TXADDR); SetEPTxCount(ENDP1, PIOS_USB_BOARD_HID_DATA_LENGTH); SetEPTxStatus(ENDP1, EP_TX_NAK); - // TODO Validate that address and length are consistent SetEPRxAddr(ENDP1, ENDP1_RXADDR); SetEPRxCount(ENDP1, PIOS_USB_BOARD_HID_DATA_LENGTH); SetEPRxStatus(ENDP1, EP_RX_VALID);