mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-07-22 06:39:18 -04:00
Reset USB controller endpoints when starting
When starting, reset the USB controller to only enable the USB CDC endpoint and the internal command channel. If the app resets firmware, but had differend endpoints enabled, we want to go back to a known state.
This commit is contained in:
parent
daa7807c0f
commit
8965fea947
4 changed files with 15 additions and 7 deletions
|
@ -525,6 +525,10 @@ int main(void)
|
|||
assert(1 == 2);
|
||||
}
|
||||
|
||||
// Reset the USB controller to only enable the USB CDC
|
||||
// endpoint and the internal command channel.
|
||||
config_endpoints(IO_CDC | IO_CH552);
|
||||
|
||||
led_set(LED_WHITE);
|
||||
|
||||
#if defined(SIMULATION)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue