Skip to content

Commit

Permalink
update libusb
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed May 2, 2024
1 parent 6d8b4d9 commit 057fc32
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion boards/STM32F722RE.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"build": {
"core": "stm32",
"cpu": "cortex-m7",
"extra_flags": "-DSTM32F722xx -DSTM32F722 -DSTM32F7 -DSTM32 -DMCU_NAME=stm32f722 -DHSE_VALUE=8000000U",
"extra_flags": "-DSTM32F722xx -DSTM32F722 -DSTM32F7xx -DSTM32F7 -DSTM32 -DMCU_NAME=stm32f722 -DHSE_VALUE=8000000U",
"f_cpu": "216000000L",
"mcu": "stm32f722",
"product_line": "STM32F722xx",
Expand Down
2 changes: 1 addition & 1 deletion boards/STM32F745XG.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"build": {
"core": "stm32",
"cpu": "cortex-m7",
"extra_flags": "-DSTM32F745xx -DSTM32F745 -DSTM32F7 -DSTM32 -DMCU_NAME=stm32f745 -DHSE_VALUE=8000000U",
"extra_flags": "-DSTM32F745xx -DSTM32F745 -DSTM32F7xx -DSTM32F7 -DSTM32 -DMCU_NAME=stm32f745 -DHSE_VALUE=8000000U",
"f_cpu": "216000000L",
"mcu": "stm32f745",
"product_line": "STM32F745xx",
Expand Down
2 changes: 1 addition & 1 deletion boards/STM32F765VI.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"build": {
"core": "stm32",
"cpu": "cortex-m7",
"extra_flags": "-DSTM32F765xx -DSTM32F765 -DSTM32F7 -DSTM32 -DMCU_NAME=stm32f765 -DHSE_VALUE=8000000U",
"extra_flags": "-DSTM32F765xx -DSTM32F765 -DSTM32F7xx -DSTM32F7 -DSTM32 -DMCU_NAME=stm32f765 -DHSE_VALUE=8000000U",
"f_cpu": "216000000L",
"mcu": "stm32f765",
"product_line": "STM32F765xx",
Expand Down
2 changes: 1 addition & 1 deletion boards/STM32H743VI.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"build": {
"core": "stm32",
"cpu": "cortex-m7",
"extra_flags": "-DSTM32H743xx -DSTM32H743 -DSTM32H7 -DSTM32 -DMCU_NAME=stm32h743 -DUSE_FAST_RAM -DUSE_DMA_RAM -DHSE_VALUE=8000000U",
"extra_flags": "-DSTM32H743xx -DSTM32H743 -DSTM32H7xx -DSTM32H7 -DSTM32 -DMCU_NAME=stm32h743 -DUSE_FAST_RAM -DUSE_DMA_RAM -DHSE_VALUE=8000000U",
"f_cpu": "480000000L",
"mcu": "stm32h743",
"product_line": "STM32H743xx",
Expand Down
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 057fc32

Please sign in to comment.