Skip to content

Commit

Permalink
update libusb
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed May 1, 2024
1 parent 6d8b4d9 commit 468ef75
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/libusb_stm32/inc/hid_usage_keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 14 additions & 14 deletions lib/libusb_stm32/inc/stm32_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,33 @@
/* bit value */
#define _BV(bit) (0x01 << (bit))

#if defined(STM32F0)
#if defined(STM32F0xx)
#include <stm32f0xx.h>
#elif defined(STM32F1)
#elif defined(STM32F1xx)
#include <stm32f1xx.h>
#elif defined(STM32F2)
#elif defined(STM32F2xx)
#include <stm32f2xx.h>
#elif defined(STM32F3)
#elif defined(STM32F3xx)
#include <stm32f3xx.h>
#elif defined(STM32F4)
#elif defined(STM32F4xx)
#include <stm32f4xx.h>
#elif defined(STM32F7)
#elif defined(STM32F7xx)
#include <stm32f7xx.h>
#elif defined(STM32H7)
#elif defined(STM32H7xx)
#include <stm32h7xx.h>
#elif defined(STM32L0)
#elif defined(STM32L0xx)
#include <stm32l0xx.h>
#elif defined(STM32L1)
#elif defined(STM32L1xx)
#include <stm32l1xx.h>
#elif defined(STM32L4)
#elif defined(STM32L4xx)
#include <stm32l4xx.h>
#elif defined(STM32L5)
#elif defined(STM32L5xx)
#include <stm32l5xx.h>
#elif defined(STM32G0)
#elif defined(STM32G0xx)
#include <stm32g0xx.h>
#elif defined(STM32G4)
#elif defined(STM32G4xx)
#include <stm32g4xx.h>
#elif defined(STM32WB)
#elif defined(STM32WBxx)
#include <stm32wbxx.h>
#else
#error "STM32 family not defined"
Expand Down
2 changes: 1 addition & 1 deletion lib/libusb_stm32/src/usbd_stm32f103_devfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/libusb_stm32/src/usbd_stm32l052_devfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/libusb_stm32/src/usbd_stm32l100_devfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/libusb_stm32/src/usbd_stm32l433_devfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/libusb_stm32/src/usbd_stm32wb55_devfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 468ef75

Please sign in to comment.