Sfoglia il codice sorgente

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 anni fa
parent
commit
4d8a62cf65
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. +2
    -0
      teensy3/usb_desc.c

+ 2
- 0
teensy3/usb_desc.c Vedi 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…
Annulla
Salva