Skip to content

Commit

Permalink
Merge pull request #70 from mossmann/fix-base32
Browse files Browse the repository at this point in the history
Correct Base32 representation of serial number
  • Loading branch information
mossmann authored May 29, 2024
2 parents c96e512 + b72d05a commit 0ee9034
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion firmware/src/mcu/samd11/usb_descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static uint16_t *get_serial_number_string_descriptor(void)
}
bits_left -= 5;
int index = (buffer >> bits_left) & 0x1f;
_desc_str[count++] = index + (index < 26 ? 'A' : '2'); // RFC 4648 Base32
_desc_str[count++] = index + (index < 26 ? 'A' : '2' - 26); // RFC 4648 Base32
}

return _desc_str;
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/vendor.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "fpga_adv.h"

#define USB_API_MAJOR 1
#define USB_API_MINOR 0
#define USB_API_MINOR 1


// Supported vendor requests.
Expand Down

0 comments on commit 0ee9034

Please sign in to comment.