From 33f8c76a968d776cba3889ce3b943bb0cd12976c Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Sat, 25 Jun 2016 21:47:57 +0200 Subject: [PATCH] VCP fix from cleanflight PR#2120 by ledvinap --- lib/main/STM32_USB-FS-Device_Driver/inc/usb_regs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/main/STM32_USB-FS-Device_Driver/inc/usb_regs.h b/lib/main/STM32_USB-FS-Device_Driver/inc/usb_regs.h index 88c6e6735..1f2486305 100644 --- a/lib/main/STM32_USB-FS-Device_Driver/inc/usb_regs.h +++ b/lib/main/STM32_USB-FS-Device_Driver/inc/usb_regs.h @@ -228,8 +228,8 @@ enum EP_BUF_NUM /* GetDADDR */ #define _GetDADDR() ((__IO uint16_t) *DADDR) -/* GetBTABLE */ -#define _GetBTABLE() ((__IO uint16_t) *BTABLE) +/* GetBTABLE ; clear low-order bits explicitly to avoid problems in gcc 5.x */ +#define _GetBTABLE() (((__IO uint16_t) *BTABLE) & ~0x07) /* SetENDPOINT */ #define _SetENDPOINT(bEpNum,wRegValue) (*(EP0REG + bEpNum)= \