fixup! lotus: Clean up serial number code

This commit is contained in:
Daniel Schaefer 2023-01-17 13:48:56 +08:00
parent 924ddf3296
commit a1480478f8
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@
// SDB is mapped to GP22
#define PICO_LOTUS
// Enable serial number
// Enable serial number. Calls into lotus_serial_number_string* functions
#define SERIAL_NUMBER
#ifdef KEYBOARD_lotus_ansi

View File

@ -735,7 +735,7 @@ const PROGMEM usbStringDescriptor_t usbStringDescriptorProduct = {
.bString = USBSTR(PRODUCT)
};
// THIS IS NOT USED by Lotus
// THIS IS NOT USED by Lotus. TODO: Implement flexible serial number here
#if defined(SERIAL_NUMBER)
const PROGMEM usbStringDescriptor_t usbStringDescriptorSerial =
.header = {
@ -1009,8 +1009,8 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) {
break;
#if defined(SERIAL_NUMBER)
case 3: // iSerialNumber
usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorSerial;
len = usbStringDescriptorSerial.header.bLength;
usbMsgPtr = (usbMsgPtr_t)lotus_serial_number_string();
len = lotus_serial_number_string_len();
break;
#endif
}