Closed obra closed 3 years ago
In order to be able to override the VID and PID for a device from inside its config.h, config.h needs to be included before usb_conf.h
This lets you stick something like this in config.h and have it 'just work'
#define USB_VID 0x1209 #define USB_PID 0x2306 #define INNER_STRINGIFY(str) #str #define STRINGIFY(str) INNER_STRINGIFY(str) #define LANDING_PAGE_URL "dfu.keyboard.io?vid=" STRINGIFY(USB_VID) ";pid=" STRINGIFY(USB_PID) ";version=" STRINGIFY(GIT_BUILD_SHA)
This seems pretty reasonable to me and it builds cleanly.
In order to be able to override the VID and PID for a device from inside its config.h, config.h needs to be included before usb_conf.h
This lets you stick something like this in config.h and have it 'just work'