add some shit, but still have a problem

This commit is contained in:
Edward Emelianov
2021-11-14 21:07:37 +03:00
parent 8741e2e428
commit bac9912056
23 changed files with 88 additions and 36 deletions

View File

@@ -188,7 +188,7 @@ static void wr0(const uint8_t *buf, uint16_t size){
USB->EPnR[0] = (status & ~(USB_EPnR_CTR_RX|USB_EPnR_CTR_TX|USB_EPnR_STAT_RX))
^ USB_EPnR_STAT_TX;
uint32_t ctr = 1000000;
while(--ctr && (USB->ISTR & USB_ISTR_CTR) == 0){IWDG->KR = IWDG_REFRESH;};
while(--ctr && (USB->ISTR & USB_ISTR_CTR) == 0){nop();}
if((USB->ISTR & USB_ISTR_CTR) == 0){
return;
}