Browse Source

Add zero to USB serial number, workaround for Mac OS-X CDC-ACM bug

http://forum.pjrc.com/threads/25482-Duplicate-usb-modem-number-HELP!
teensy4-core
PaulStoffregen 10 years ago
parent
commit
4d8a62cf65
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      teensy3/usb_desc.c

+ 2
- 0
teensy3/usb_desc.c View File

@@ -728,6 +728,8 @@ void usb_init_serialnumber(void)
while (!(FTFL_FSTAT & FTFL_FSTAT_CCIF)) ; // wait
num = *(uint32_t *)&FTFL_FCCOB7;
__enable_irq();
// add extra zero to work around OS-X CDC-ACM driver bug
if (num < 10000000) num = num * 10;
ultoa(num, buf, 10);
for (i=0; i<10; i++) {
char c = buf[i];

Loading…
Cancel
Save