Override D13 pin

This commit is contained in:
Melissa LeBlanc-Williams 2023-08-09 08:19:34 -07:00
parent ab638d4bf2
commit 7a4edfaa9f
2 changed files with 22 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "components/driver/include/driver/gpio.h"
void board_init(void) {
// Debug UART
@ -36,4 +37,14 @@ void board_init(void) {
#endif
}
bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
if (pin_number == 13) {
// Set D13 LED to output by default.
gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT);
return true;
}
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -27,6 +27,7 @@
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "components/driver/include/driver/gpio.h"
void board_init(void) {
// Debug UART
@ -36,4 +37,14 @@ void board_init(void) {
#endif
}
bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
if (pin_number == 13) {
// Set D13 LED to output by default.
gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT);
return true;
}
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.