diff options
| author | hathach <[email protected]> | 2019-12-21 23:53:48 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-12-21 23:53:48 +0700 |
| commit | 94e70f9b016edfcdea165674e17201fda88a089b (patch) | |
| tree | 154c4db08bdc239078b84f1c94f0d2019303f6af /src | |
| parent | 421221baa5b8509b705f76def43fd684c5fe06df (diff) | |
| parent | a601f59df5e61801cbbe87467c70a48b740d4bfd (diff) | |
Merge branch 'master' into port-samg55
Diffstat (limited to 'src')
| -rw-r--r-- | src/class/hid/hid.h | 4 | ||||
| -rw-r--r-- | src/osal/osal_mynewt.h | 2 | ||||
| -rw-r--r-- | src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c | 5 | ||||
| -rw-r--r-- | src/portable/st/synopsys/dcd_synopsys.c | 8 | ||||
| -rw-r--r-- | src/portable/valentyusb/eptri/dcd_eptri.c | 2 |
5 files changed, 10 insertions, 11 deletions
diff --git a/src/class/hid/hid.h b/src/class/hid/hid.h index a3a9ffc88..7fa4aa8ab 100644 --- a/src/class/hid/hid.h +++ b/src/class/hid/hid.h @@ -180,7 +180,7 @@ typedef enum /// Standard HID Boot Protocol Keyboard Report.
typedef struct TU_ATTR_PACKED
{
- uint8_t modifier; /**< Keyboard modifier (KEYBOARD_MODIFER_* masks). */
+ uint8_t modifier; /**< Keyboard modifier (KEYBOARD_MODIFIER_* masks). */
uint8_t reserved; /**< Reserved for OEM use, always set to 0. */
uint8_t keycode[6]; /**< Key codes of the currently pressed keys. */
} hid_keyboard_report_t;
@@ -812,7 +812,7 @@ enum {'#' , '~' }, /* 0x32 */ \
{';' , ':' }, /* 0x33 */ \
{'\'' , '\"' }, /* 0x34 */ \
- {0 , 0 }, /* 0x35 */ \
+ {'`' , '~' }, /* 0x35 */ \
{',' , '<' }, /* 0x36 */ \
{'.' , '>' }, /* 0x37 */ \
{'/' , '?' }, /* 0x38 */ \
diff --git a/src/osal/osal_mynewt.h b/src/osal/osal_mynewt.h index da7977d39..e47e140c1 100644 --- a/src/osal/osal_mynewt.h +++ b/src/osal/osal_mynewt.h @@ -98,7 +98,7 @@ static inline bool osal_mutex_unlock(osal_mutex_t mutex_hdl) // role device/host is used by OS NONE for mutex (disable usb isr) only #define OSAL_QUEUE_DEF(_role, _name, _depth, _type) \ static _type _name##_##buf[_depth];\ - static struct os_event* _name##_##evbuf[_depth];\ + static struct os_event _name##_##evbuf[_depth];\ osal_queue_def_t _name = { .depth = _depth, .item_sz = sizeof(_type), .buf = _name##_##buf, .evbuf = _name##_##evbuf};\ typedef struct diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c index 341aa5f55..a1f40d971 100644 --- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c +++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c @@ -30,7 +30,7 @@ /********************************************** * This driver has been tested with the following MCUs: - * - F070, F072, L053 + * - F070, F072, L053, F042F6 * * It also should work with minimal changes for any ST MCU with an "USB A"/"PCD"/"HCD" peripheral. This * covers: @@ -44,6 +44,9 @@ * L4x2, L4x3 1024 byte buffer * * To use this driver, you must: + * - If you are using a device with crystal-less USB, set up the clock recovery system (CRS) + * - Remap pins to be D+/D- on devices that they are shared (for example: F042Fx) + * - This is different to the normal "alternate function" GPIO interface, needs to go through SYSCFG->CFGRx register * - Enable USB clock; Perhaps use __HAL_RCC_USB_CLK_ENABLE(); * - (Optionally configure GPIO HAL to tell it the USB driver is using the USB pins) * - call tusb_init(); diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c index e02580e4f..c16211a9d 100644 --- a/src/portable/st/synopsys/dcd_synopsys.c +++ b/src/portable/st/synopsys/dcd_synopsys.c @@ -207,12 +207,8 @@ void dcd_init (uint8_t rhport) USB_OTG_GINTMSK_SOFM | USB_OTG_GINTMSK_RXFLVLM /* SB_OTG_GINTMSK_ESUSPM | \ USB_OTG_GINTMSK_USBSUSPM */; - // Enable VBUS hardware sensing, enable pullup, enable peripheral. -#ifdef USB_OTG_GCCFG_VBDEN - USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBDEN | USB_OTG_GCCFG_PWRDWN; -#else - USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBUSBSEN | USB_OTG_GCCFG_PWRDWN; -#endif + // Enable USB transceiver. + USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_PWRDWN; // Soft Connect -> Enable pullup on D+/D-. // This step does not appear to be specified in the programmer's model. diff --git a/src/portable/valentyusb/eptri/dcd_eptri.c b/src/portable/valentyusb/eptri/dcd_eptri.c index e555fb0b1..67e0c59aa 100644 --- a/src/portable/valentyusb/eptri/dcd_eptri.c +++ b/src/portable/valentyusb/eptri/dcd_eptri.c @@ -226,7 +226,7 @@ static void process_rx(void) { test_buffer[total_read] = c; #endif total_read++; - if ((rx_buffer_offset[rx_ep] + current_offset) < rx_buffer_max[rx_ep]) { + if (current_offset < rx_buffer_max[rx_ep]) { #if LOG_USB usb_log[usb_log_offset].data[usb_log[usb_log_offset].size++] = c; #endif |
