From 468ef75955a22548edd884354e4bb841ada58e2c Mon Sep 17 00:00:00 2001 From: bkleiner Date: Thu, 2 May 2024 00:45:00 +0200 Subject: [PATCH] update libusb --- lib/libusb_stm32/inc/hid_usage_keyboard.h | 2 +- lib/libusb_stm32/inc/stm32_compat.h | 28 ++++++++++----------- lib/libusb_stm32/src/usbd_stm32f103_devfs.c | 2 +- lib/libusb_stm32/src/usbd_stm32l052_devfs.c | 2 +- lib/libusb_stm32/src/usbd_stm32l100_devfs.c | 2 +- lib/libusb_stm32/src/usbd_stm32l433_devfs.c | 2 +- lib/libusb_stm32/src/usbd_stm32wb55_devfs.c | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/libusb_stm32/inc/hid_usage_keyboard.h b/lib/libusb_stm32/inc/hid_usage_keyboard.h index 90872e3f9..2cd0f9715 100644 --- a/lib/libusb_stm32/inc/hid_usage_keyboard.h +++ b/lib/libusb_stm32/inc/hid_usage_keyboard.h @@ -78,7 +78,7 @@ #define HID_KEYBOARD_SEMICOLON 0x33 #define HID_KEYBOARD_APOSTROPHE 0x34 #define HID_KEYBOARD_GRAVE_ACCENT 0x35 -#define HID_KEYBOARD_COLON 0x36 +#define HID_KEYBOARD_COMMA 0x36 #define HID_KEYBOARD_DOT 0x37 #define HID_KEYBOARD_SLASH 0x38 #define HID_KEYBOARD_CAPS_LOCK 0x39 diff --git a/lib/libusb_stm32/inc/stm32_compat.h b/lib/libusb_stm32/inc/stm32_compat.h index c2415432c..156456781 100644 --- a/lib/libusb_stm32/inc/stm32_compat.h +++ b/lib/libusb_stm32/inc/stm32_compat.h @@ -21,33 +21,33 @@ /* bit value */ #define _BV(bit) (0x01 << (bit)) -#if defined(STM32F0) +#if defined(STM32F0xx) #include -#elif defined(STM32F1) +#elif defined(STM32F1xx) #include -#elif defined(STM32F2) +#elif defined(STM32F2xx) #include -#elif defined(STM32F3) +#elif defined(STM32F3xx) #include -#elif defined(STM32F4) +#elif defined(STM32F4xx) #include -#elif defined(STM32F7) +#elif defined(STM32F7xx) #include -#elif defined(STM32H7) +#elif defined(STM32H7xx) #include -#elif defined(STM32L0) +#elif defined(STM32L0xx) #include -#elif defined(STM32L1) +#elif defined(STM32L1xx) #include -#elif defined(STM32L4) +#elif defined(STM32L4xx) #include -#elif defined(STM32L5) +#elif defined(STM32L5xx) #include -#elif defined(STM32G0) +#elif defined(STM32G0xx) #include -#elif defined(STM32G4) +#elif defined(STM32G4xx) #include -#elif defined(STM32WB) +#elif defined(STM32WBxx) #include #else #error "STM32 family not defined" diff --git a/lib/libusb_stm32/src/usbd_stm32f103_devfs.c b/lib/libusb_stm32/src/usbd_stm32f103_devfs.c index 2e8143586..575d6b0f7 100644 --- a/lib/libusb_stm32/src/usbd_stm32f103_devfs.c +++ b/lib/libusb_stm32/src/usbd_stm32f103_devfs.c @@ -153,7 +153,7 @@ static uint16_t get_next_pma(uint16_t sz) { if ((tbl->tx.addr) && (tbl->tx.addr < _result)) _result = tbl->tx.addr; if ((tbl->rx.addr) && (tbl->rx.addr < _result)) _result = tbl->rx.addr; } - return (_result < (0x020 + sz)) ? 0 : (_result - sz); + return (_result < (0x020U + sz)) ? 0 : (_result - sz); } static uint32_t getinfo(void) { diff --git a/lib/libusb_stm32/src/usbd_stm32l052_devfs.c b/lib/libusb_stm32/src/usbd_stm32l052_devfs.c index e2ba11e82..6bc65adf0 100644 --- a/lib/libusb_stm32/src/usbd_stm32l052_devfs.c +++ b/lib/libusb_stm32/src/usbd_stm32l052_devfs.c @@ -101,7 +101,7 @@ static uint16_t get_next_pma(uint16_t sz) { if ((tbl->rx.addr) && (tbl->rx.addr < _result)) _result = tbl->rx.addr; if ((tbl->tx.addr) && (tbl->tx.addr < _result)) _result = tbl->tx.addr; } - return (_result < (0x020 + sz)) ? 0 : (_result - sz); + return (_result < (0x020U + sz)) ? 0 : (_result - sz); } static uint32_t getinfo(void) { diff --git a/lib/libusb_stm32/src/usbd_stm32l100_devfs.c b/lib/libusb_stm32/src/usbd_stm32l100_devfs.c index 77488eda8..9da29fe75 100644 --- a/lib/libusb_stm32/src/usbd_stm32l100_devfs.c +++ b/lib/libusb_stm32/src/usbd_stm32l100_devfs.c @@ -90,7 +90,7 @@ static uint16_t get_next_pma(uint16_t sz) { if ((tbl->tx.addr) && (tbl->tx.addr < _result)) _result = tbl->tx.addr; if ((tbl->rx.addr) && (tbl->rx.addr < _result)) _result = tbl->rx.addr; } - return (_result < (0x020 + sz)) ? 0 : (_result - sz); + return (_result < (0x020U + sz)) ? 0 : (_result - sz); } static uint32_t getinfo(void) { diff --git a/lib/libusb_stm32/src/usbd_stm32l433_devfs.c b/lib/libusb_stm32/src/usbd_stm32l433_devfs.c index 133624cc1..5b3f95381 100644 --- a/lib/libusb_stm32/src/usbd_stm32l433_devfs.c +++ b/lib/libusb_stm32/src/usbd_stm32l433_devfs.c @@ -94,7 +94,7 @@ static uint16_t get_next_pma(uint16_t sz) { if ((tbl->rx.addr) && (tbl->rx.addr < _result)) _result = tbl->rx.addr; if ((tbl->tx.addr) && (tbl->tx.addr < _result)) _result = tbl->tx.addr; } - return (_result < (0x020 + sz)) ? 0 : (_result - sz); + return (_result < (0x020U + sz)) ? 0 : (_result - sz); } static uint32_t getinfo(void) { diff --git a/lib/libusb_stm32/src/usbd_stm32wb55_devfs.c b/lib/libusb_stm32/src/usbd_stm32wb55_devfs.c index 07a50b0ac..1e234538f 100644 --- a/lib/libusb_stm32/src/usbd_stm32wb55_devfs.c +++ b/lib/libusb_stm32/src/usbd_stm32wb55_devfs.c @@ -94,7 +94,7 @@ static uint16_t get_next_pma(uint16_t sz) { if ((tbl->rx.addr) && (tbl->rx.addr < _result)) _result = tbl->rx.addr; if ((tbl->tx.addr) && (tbl->tx.addr < _result)) _result = tbl->tx.addr; } - return (_result < (unsigned)(0x020 + sz)) ? 0 : (_result - sz); + return (_result < (0x020U + sz)) ? 0 : (_result - sz); } static uint32_t getinfo(void) {