Skip to content

Commit

Permalink
Pipboy custom USB ID
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Nov 21, 2024
1 parent ce54b79 commit 61d9f11
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion boards/PIPBOY.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@
'WRAPPERSOURCES += libs/pipboy/jswrap_font_monofonto_28.c',
'WRAPPERSOURCES += libs/pipboy/jswrap_font_monofonto_23.c',
'WRAPPERSOURCES += libs/pipboy/jswrap_font_monofonto_18.c',
'WRAPPERSOURCES += libs/pipboy/jswrap_font_monofonto_16.c',
'WRAPPERSOURCES += libs/pipboy/jswrap_font_monofonto_16.c',
'DEFINES+=-DUSBD_MANUFACTURER_STRING=\'"The Wand Company"\'',
'DEFINES+=-DUSBD_PRODUCT_STRING_FS=\'"Pip-Boy"\'',
'DEFINES+=-DUSB_PRODUCT_ID=0xA4F1', # 0xA4F1 assigned by ST for the Pip-Boy (0xA4DF = Tricorder)
# 'USE_DFU=1'
]
}
Expand Down
1 change: 1 addition & 0 deletions src/jsinteractive.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,7 @@ void jsiChangeToHistory(bool previous) {
}
}

/// Called before the inputLine is modified, even if we're just adding on the end of it
void jsiIsAboutToEditInputLine() {
// we probably plan to do something with the line now - check it wasn't in history
// and if it was, duplicate it
Expand Down
6 changes: 5 additions & 1 deletion targetlibs/stm32usb/usbd_desc.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,15 @@
*/
#define USBD_VID 0x0483 // STMicroelectronics VID (1155 decimal)
#define USBD_LANGID_STRING 1033
#ifndef USBD_MANUFACTURER_STRING
#define USBD_MANUFACTURER_STRING "STMicroelectronics"
#endif
#ifndef USB_PRODUCT_ID
#define USB_PRODUCT_ID 22336
#define USB_PRODUCT_ID 0x5740 // ST's standard PID is 0x5740 / 22336 decimal
#endif
#ifndef USBD_PRODUCT_STRING_FS
#define USBD_PRODUCT_STRING_FS "STM32 Virtual ComPort"
#endif
#define USBD_SERIALNUMBER_STRING_FS "00000000001A"
#define USBD_CONFIGURATION_STRING_FS "CDC Config"
#define USBD_INTERFACE_STRING_FS "CDC Interface"
Expand Down

0 comments on commit 61d9f11

Please sign in to comment.