From cad09faf02fa741094c122978a9b6aa38255f8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Fri, 20 Jan 2017 02:04:08 +0100 Subject: [PATCH] Resolve USB reenumeration issue. Don't ask me why it's working now. We should find an explanation eventually. --- right/src/init_peripherials.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/right/src/init_peripherials.c b/right/src/init_peripherials.c index 18e4d33..0e4ca0c 100644 --- a/right/src/init_peripherials.c +++ b/right/src/init_peripherials.c @@ -48,9 +48,11 @@ void InitPeripherials(void) { InitResetButton(); InitMergeSensor(); - InitTestLed(); InitI2c(); #if UHK_PCB_MAJOR_VERSION == 7 LedPwm_Init(); #endif + InitTestLed(); // This function must not be called before LedPwm_Init() or else the UHK won't + // enumerate over USB unless disconnecting it, waiting for at least 4 seconds + // and reconnecting it. This is the strangest thing ever! }