Fix to prevent critical pins from being reset when MCU restarts or enters REPL

This commit is contained in:
Chris Osterwood 2019-05-14 15:23:33 -04:00
parent 420dbafa9d
commit a0497553fc

View File

@ -27,8 +27,16 @@
#include "boards/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"
#include "common-hal/microcontroller/Pin.h"
void board_init(void) {
// Don't reset:
// - USB Host Enable Pin
// - reset pin of the USB Hub
//
// If either are reset, USB devices will disconnect when the MCU restarts
never_reset_pin_number(PIN_PA07);
never_reset_pin_number(PIN_PB08);
}
bool board_requests_safe_mode(void) {