[usb] Change apps and relocate usb stack on ram.

When the device is plugged to a USB host.

Change-Id: I5d7ae3c86cacce509b6ccca2746984f7e806cb49
This commit is contained in:
Léa Saviot
2018-03-20 11:23:16 +01:00
parent 4368989611
commit b7829a0937
17 changed files with 202 additions and 104 deletions

View File

@@ -31,7 +31,6 @@ bool RunLoop::step() {
int eventDuration = Timer::TickDuration;
int timeout = eventDuration;
Ion::Events::Event event = Ion::Events::getEvent(&timeout);
assert(event.isDefined());
eventDuration -= timeout;
assert(eventDuration >= 0);
@@ -54,6 +53,12 @@ bool RunLoop::step() {
}
}
if (event == Ion::Events::USBEnumeration) {
dispatchEvent(event);
}
assert(event.isDefined());
#if ESCHER_LOG_EVENTS_BINARY
Ion::Console::writeChar((char)event.id());
#endif