hide deprecated code; make USB snippet common for F0/F1/F3

This commit is contained in:
Edward Emelianov
2024-09-02 18:21:41 +03:00
parent 9166996bff
commit bdbd7d68d9
419 changed files with 3445 additions and 752 deletions

View File

@@ -33,9 +33,8 @@ int main(void){
char inbuff[MAXSTRLEN+1];
StartHSE();
hw_setup();
SysTick_Config(72000);
USBPU_OFF();
hw_setup();
SysTick_Config(72000);
usart_setup();
USB_setup();
USBPU_ON();
@@ -56,6 +55,7 @@ int main(void){
if(l < 0) USB_sendstr("ERROR: USB buffer overflow or string was too long\n");
else if(l){
USEND("Got USB data\n");
USB_sendstr("RECEIVED: _"); USB_sendstr(inbuff); USB_sendstr("_\n");
const char *ans = parse_cmd(inbuff);
if(ans) USB_sendstr(ans);
}