USB reset initial

pull/115/head
Alex Voinea 2021-09-20 17:26:59 +02:00
parent 29018671b5
commit 6346dd3989
1 changed files with 4 additions and 0 deletions

View File

@ -136,6 +136,10 @@ void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t *const CDCI
char str[50];
sprintf_P(str, PSTR("baud:%lu\n"), CDCInterfaceInfo->State.LineEncoding.BaudRateBPS);
hal::usart::usart1.puts(str);
if (CDCInterfaceInfo->State.LineEncoding.BaudRateBPS == 1200) {
*(uint16_t *)0x0800U = 0x7777;
hal::cpu::Reset();
}
}
}