redo pin never resetting for mimxrt10xx

This commit is contained in:
Dan Halbert 2022-12-14 19:34:26 -05:00
parent 369507e1da
commit 5c569f03c2
12 changed files with 356 additions and 156 deletions

View File

@ -26,21 +26,40 @@
*/
#include "supervisor/board.h"
#include "boards/flash_config.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
void board_init(void) {
// SWD Pins
common_hal_never_reset_pin(&pin_GPIO_AD_13);// SWDIO
common_hal_never_reset_pin(&pin_GPIO_AD_12);// SWCLK
// These pins should never ever be reset; doing so could interfere with basic operation.
STATIC const mcu_pin_obj_t *_reset_forbidden_pins[] = {
&pin_GPIO_AD_13,// SWDIO
&pin_GPIO_AD_12,// SWCLK
// FLEX flash
common_hal_never_reset_pin(&pin_GPIO_SD_12);
common_hal_never_reset_pin(&pin_GPIO_SD_11);
common_hal_never_reset_pin(&pin_GPIO_SD_10);
common_hal_never_reset_pin(&pin_GPIO_SD_09);
common_hal_never_reset_pin(&pin_GPIO_SD_08);
common_hal_never_reset_pin(&pin_GPIO_SD_07);
common_hal_never_reset_pin(&pin_GPIO_SD_06);
&pin_GPIO_SD_12,
&pin_GPIO_SD_11,
&pin_GPIO_SD_10,
&pin_GPIO_SD_09,
&pin_GPIO_SD_08,
&pin_GPIO_SD_07,
&pin_GPIO_SD_06,
};
STATIC bool _reset_forbidden(const mcu_pin_obj_t *pin) {
for (size_t i = 0; i < MP_ARRAY_SIZE(_reset_forbidden_pins); i++) {
if (pin == _reset_forbidden_pins[i]) {
return true;
}
}
return false;
}
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
if (_reset_forbidden(pin)) {
return true;
}
// Other reset variations would go here.
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -26,23 +26,41 @@
*/
#include "supervisor/board.h"
#include "boards/flash_config.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
void board_init(void) {
// SWD Pins
common_hal_never_reset_pin(&pin_GPIO_AD_13);// SWDIO
common_hal_never_reset_pin(&pin_GPIO_AD_12);// SWCLK
// These pins should never ever be reset; doing so could interfere with basic operation.
STATIC const mcu_pin_obj_t *_reset_forbidden_pins[] = {
&pin_GPIO_AD_13,// SWDIO
&pin_GPIO_AD_12,// SWCLK
// FLEX flash
common_hal_never_reset_pin(&pin_GPIO_SD_12);
common_hal_never_reset_pin(&pin_GPIO_SD_11);
common_hal_never_reset_pin(&pin_GPIO_SD_10);
common_hal_never_reset_pin(&pin_GPIO_SD_09);
common_hal_never_reset_pin(&pin_GPIO_SD_08);
common_hal_never_reset_pin(&pin_GPIO_SD_07);
common_hal_never_reset_pin(&pin_GPIO_SD_06);
&pin_GPIO_SD_12,
&pin_GPIO_SD_11,
&pin_GPIO_SD_10,
&pin_GPIO_SD_09,
&pin_GPIO_SD_08,
&pin_GPIO_SD_07,
&pin_GPIO_SD_06,
};
STATIC bool _reset_forbidden(const mcu_pin_obj_t *pin) {
for (size_t i = 0; i < MP_ARRAY_SIZE(_reset_forbidden_pins); i++) {
if (pin == _reset_forbidden_pins[i]) {
return true;
}
}
return false;
}
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
if (_reset_forbidden(pin)) {
return true;
}
// Other reset variations would go here.
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -26,22 +26,40 @@
*/
#include "supervisor/board.h"
#include "boards/flash_config.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
void board_init(void) {
// These pins should never ever be reset; doing so could interfere with basic operation.
STATIC const mcu_pin_obj_t *_reset_forbidden_pins[] = {
// SWD Pins
common_hal_never_reset_pin(&pin_GPIO_AD_B0_06);// SWDIO
common_hal_never_reset_pin(&pin_GPIO_AD_B0_07);// SWCLK
&pin_GPIO_AD_B0_06,// SWDIO
&pin_GPIO_AD_B0_07,// SWCLK
// FLEX flash
common_hal_never_reset_pin(&pin_GPIO_SD_B1_06);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_07);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_08);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_09);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_10);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_11);
&pin_GPIO_SD_B1_06,
&pin_GPIO_SD_B1_07,
&pin_GPIO_SD_B1_08,
&pin_GPIO_SD_B1_09,
&pin_GPIO_SD_B1_10,
&pin_GPIO_SD_B1_11,
};
STATIC bool _reset_forbidden(const mcu_pin_obj_t *pin) {
for (size_t i = 0; i < MP_ARRAY_SIZE(_reset_forbidden_pins); i++) {
if (pin == _reset_forbidden_pins[i]) {
return true;
}
}
return false;
}
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
if (_reset_forbidden(pin)) {
return true;
}
// Other reset variations would go here.
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -26,25 +26,42 @@
*/
#include "supervisor/board.h"
#include "boards/flash_config.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
void board_init(void) {
// SWD Pins
common_hal_never_reset_pin(&pin_GPIO_AD_13); // SWDIO
common_hal_never_reset_pin(&pin_GPIO_AD_12); // SWCLK
// These pins should never ever be reset; doing so could interfere with basic operation.
STATIC const mcu_pin_obj_t *_reset_forbidden_pins[] = {
&pin_GPIO_AD_13, // SWDIO
&pin_GPIO_AD_12, // SWCLK
// FLEX flash
common_hal_never_reset_pin(&pin_GPIO_SD_12);
common_hal_never_reset_pin(&pin_GPIO_SD_11);
common_hal_never_reset_pin(&pin_GPIO_SD_10);
common_hal_never_reset_pin(&pin_GPIO_SD_09);
common_hal_never_reset_pin(&pin_GPIO_SD_08);
common_hal_never_reset_pin(&pin_GPIO_SD_07);
common_hal_never_reset_pin(&pin_GPIO_SD_06);
&pin_GPIO_SD_12,
&pin_GPIO_SD_11,
&pin_GPIO_SD_10,
&pin_GPIO_SD_09,
&pin_GPIO_SD_08,
&pin_GPIO_SD_07,
&pin_GPIO_SD_06,
// USB Pins
common_hal_never_reset_pin(&pin_GPIO_12);
common_hal_never_reset_pin(&pin_GPIO_13);
&pin_GPIO_12,
&pin_GPIO_13,
};
STATIC bool _reset_forbidden(const mcu_pin_obj_t *pin) {
for (size_t i = 0; i < MP_ARRAY_SIZE(_reset_forbidden_pins); i++) {
if (pin == _reset_forbidden_pins[i]) {
return true;
}
}
return false;
}
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
if (_reset_forbidden(pin)) {
return true;
}
// Other reset variations would go here.
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -26,26 +26,44 @@
*/
#include "supervisor/board.h"
#include "boards/flash_config.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
void board_init(void) {
// These pins should never ever be reset; doing so could interfere with basic operation.
STATIC const mcu_pin_obj_t *_reset_forbidden_pins[] = {
// SWD Pins
common_hal_never_reset_pin(&pin_GPIO_AD_B0_00);// SWDIO
common_hal_never_reset_pin(&pin_GPIO_AD_B0_01);// SWCLK
&pin_GPIO_AD_B0_00,// SWDIO
&pin_GPIO_AD_B0_01,// SWCLK
// FLEX flash
common_hal_never_reset_pin(&pin_GPIO_SD_B1_06);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_07);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_08);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_09);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_10);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_11);
&pin_GPIO_SD_B1_06,
&pin_GPIO_SD_B1_07,
&pin_GPIO_SD_B1_08,
&pin_GPIO_SD_B1_09,
&pin_GPIO_SD_B1_10,
&pin_GPIO_SD_B1_11,
// USB Pins
common_hal_never_reset_pin(&pin_GPIO_AD_B1_11);
common_hal_never_reset_pin(&pin_GPIO_AD_B1_12);
&pin_GPIO_AD_B1_11,
&pin_GPIO_AD_B1_12,
};
STATIC bool _reset_forbidden(const mcu_pin_obj_t *pin) {
for (size_t i = 0; i < MP_ARRAY_SIZE(_reset_forbidden_pins); i++) {
if (pin == _reset_forbidden_pins[i]) {
return true;
}
}
return false;
}
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
if (_reset_forbidden(pin)) {
return true;
}
// Other reset variations would go here.
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -26,30 +26,51 @@
*/
#include "supervisor/board.h"
#include "boards/flash_config.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
void board_init(void) {
// These pins should never ever be reset; doing so could interfere with basic operation.
STATIC const mcu_pin_obj_t *_reset_forbidden_pins[] = {
// SWD Pins
common_hal_never_reset_pin(&pin_GPIO_AD_B0_06);// SWDIO
common_hal_never_reset_pin(&pin_GPIO_AD_B0_07);// SWCLK
&pin_GPIO_AD_B0_06, // SWDIO
&pin_GPIO_AD_B0_07, // SWCLK
// FLEX flash
common_hal_never_reset_pin(&pin_GPIO_SD_B1_00);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_01);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_02);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_03);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_04);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_05);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_06);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_07);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_08);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_09);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_10);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_11);
&pin_GPIO_SD_B1_00,
&pin_GPIO_SD_B1_01,
&pin_GPIO_SD_B1_02,
&pin_GPIO_SD_B1_03,
&pin_GPIO_SD_B1_04,
&pin_GPIO_SD_B1_05,
&pin_GPIO_SD_B1_06,
&pin_GPIO_SD_B1_07,
&pin_GPIO_SD_B1_08,
&pin_GPIO_SD_B1_09,
&pin_GPIO_SD_B1_10,
&pin_GPIO_SD_B1_11,
// USB Pins
common_hal_never_reset_pin(&pin_GPIO_AD_B0_01);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_03);
&pin_GPIO_AD_B0_01,
&pin_GPIO_AD_B0_03,
};
STATIC bool _reset_forbidden(const mcu_pin_obj_t *pin) {
for (size_t i = 0; i < MP_ARRAY_SIZE(_reset_forbidden_pins); i++) {
if (pin == _reset_forbidden_pins[i]) {
return true;
}
}
return false;
}
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
if (_reset_forbidden(pin)) {
return true;
}
// Other reset variations would go here.
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -26,23 +26,41 @@
*/
#include "supervisor/board.h"
#include "boards/flash_config.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
void board_init(void) {
// These pins should never ever be reset; doing so could interfere with basic operation.
STATIC const mcu_pin_obj_t *_reset_forbidden_pins[] = {
// SWD Pins
common_hal_never_reset_pin(&pin_GPIO_AD_13);// SWDIO
common_hal_never_reset_pin(&pin_GPIO_AD_12);// SWCLK
&pin_GPIO_AD_13,// SWDIO
&pin_GPIO_AD_12,// SWCLK
// FLEX flash
common_hal_never_reset_pin(&pin_GPIO_SD_12);
common_hal_never_reset_pin(&pin_GPIO_SD_11);
common_hal_never_reset_pin(&pin_GPIO_SD_10);
common_hal_never_reset_pin(&pin_GPIO_SD_09);
common_hal_never_reset_pin(&pin_GPIO_SD_08);
common_hal_never_reset_pin(&pin_GPIO_SD_07);
common_hal_never_reset_pin(&pin_GPIO_SD_06);
&pin_GPIO_SD_12,
&pin_GPIO_SD_11,
&pin_GPIO_SD_10,
&pin_GPIO_SD_09,
&pin_GPIO_SD_08,
&pin_GPIO_SD_07,
&pin_GPIO_SD_06,
};
STATIC bool _reset_forbidden(const mcu_pin_obj_t *pin) {
for (size_t i = 0; i < MP_ARRAY_SIZE(_reset_forbidden_pins); i++) {
if (pin == _reset_forbidden_pins[i]) {
return true;
}
}
return false;
}
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
if (_reset_forbidden(pin)) {
return true;
}
// Other reset variations would go here.
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -26,31 +26,48 @@
*/
#include "supervisor/board.h"
#include "boards/flash_config.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
void board_init(void) {
// FLEX flash
common_hal_never_reset_pin(&pin_GPIO_SD_B1_06);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_07);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_08);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_09);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_10);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_11);
// These pins should never ever be reset; doing so could interfere with basic operation.
STATIC const mcu_pin_obj_t *_reset_forbidden_pins[] = {
&pin_GPIO_SD_B1_06,
&pin_GPIO_SD_B1_07,
&pin_GPIO_SD_B1_08,
&pin_GPIO_SD_B1_09,
&pin_GPIO_SD_B1_10,
&pin_GPIO_SD_B1_11,
// FLEX flash 2
common_hal_never_reset_pin(&pin_GPIO_AD_B0_04);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_06);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_07);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_08);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_09);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_10);
common_hal_never_reset_pin(&pin_GPIO_EMC_01);
common_hal_never_reset_pin(&pin_GPIO_B0_13);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_11);
&pin_GPIO_AD_B0_04,
&pin_GPIO_AD_B0_06,
&pin_GPIO_AD_B0_07,
&pin_GPIO_AD_B0_08,
&pin_GPIO_AD_B0_09,
&pin_GPIO_AD_B0_10,
&pin_GPIO_EMC_01,
&pin_GPIO_B0_13,
&pin_GPIO_AD_B0_11,
// Data strobe needs protection despite being grounded
common_hal_never_reset_pin(&pin_GPIO_SD_B1_05);
&pin_GPIO_SD_B1_05,
};
STATIC bool _reset_forbidden(const mcu_pin_obj_t *pin) {
for (size_t i = 0; i < MP_ARRAY_SIZE(_reset_forbidden_pins); i++) {
if (pin == _reset_forbidden_pins[i]) {
return true;
}
}
return false;
}
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
if (_reset_forbidden(pin)) {
return true;
}
// Other reset variations would go here.
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -26,31 +26,49 @@
*/
#include "supervisor/board.h"
#include "boards/flash_config.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
void board_init(void) {
// These pins should never ever be reset; doing so could interfere with basic operation.
STATIC const mcu_pin_obj_t *_reset_forbidden_pins[] = {
// FLEX flash
common_hal_never_reset_pin(&pin_GPIO_SD_B1_06);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_07);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_08);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_09);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_10);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_11);
&pin_GPIO_SD_B1_06,
&pin_GPIO_SD_B1_07,
&pin_GPIO_SD_B1_08,
&pin_GPIO_SD_B1_09,
&pin_GPIO_SD_B1_10,
&pin_GPIO_SD_B1_11,
// FLEX flash 2
common_hal_never_reset_pin(&pin_GPIO_AD_B0_04);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_06);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_07);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_08);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_09);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_10);
common_hal_never_reset_pin(&pin_GPIO_EMC_01);
common_hal_never_reset_pin(&pin_GPIO_B0_13);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_11);
&pin_GPIO_AD_B0_04,
&pin_GPIO_AD_B0_06,
&pin_GPIO_AD_B0_07,
&pin_GPIO_AD_B0_08,
&pin_GPIO_AD_B0_09,
&pin_GPIO_AD_B0_10,
&pin_GPIO_EMC_01,
&pin_GPIO_B0_13,
&pin_GPIO_AD_B0_11,
// Data strobe needs protection despite being grounded
common_hal_never_reset_pin(&pin_GPIO_SD_B1_05);
&pin_GPIO_SD_B1_05,
};
STATIC bool _reset_forbidden(const mcu_pin_obj_t *pin) {
for (size_t i = 0; i < MP_ARRAY_SIZE(_reset_forbidden_pins); i++) {
if (pin == _reset_forbidden_pins[i]) {
return true;
}
}
return false;
}
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
if (_reset_forbidden(pin)) {
return true;
}
// Other reset variations would go here.
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -26,29 +26,49 @@
*/
#include "supervisor/board.h"
#include "boards/flash_config.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
void board_init(void) {
// These pins should never ever be reset; doing so could interfere with basic operation.
STATIC const mcu_pin_obj_t *_reset_forbidden_pins[] = {
// FLEX flash
common_hal_never_reset_pin(&pin_GPIO_SD_B1_06);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_07);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_08);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_09);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_10);
common_hal_never_reset_pin(&pin_GPIO_SD_B1_11);
&pin_GPIO_SD_B1_06,
&pin_GPIO_SD_B1_07,
&pin_GPIO_SD_B1_08,
&pin_GPIO_SD_B1_09,
&pin_GPIO_SD_B1_10,
&pin_GPIO_SD_B1_11,
// FLEX flash 2
common_hal_never_reset_pin(&pin_GPIO_AD_B0_04);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_06);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_07);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_08);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_09);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_10);
common_hal_never_reset_pin(&pin_GPIO_EMC_01);
common_hal_never_reset_pin(&pin_GPIO_B0_13);
common_hal_never_reset_pin(&pin_GPIO_AD_B0_11);
&pin_GPIO_AD_B0_04,
&pin_GPIO_AD_B0_06,
&pin_GPIO_AD_B0_07,
&pin_GPIO_AD_B0_08,
&pin_GPIO_AD_B0_09,
&pin_GPIO_AD_B0_10,
&pin_GPIO_EMC_01,
&pin_GPIO_B0_13,
&pin_GPIO_AD_B0_11,
// Data strobe needs protection despite being grounded
common_hal_never_reset_pin(&pin_GPIO_SD_B1_05);
&pin_GPIO_SD_B1_05,
};
STATIC bool _reset_forbidden(const mcu_pin_obj_t *pin) {
for (size_t i = 0; i < MP_ARRAY_SIZE(_reset_forbidden_pins); i++) {
if (pin == _reset_forbidden_pins[i]) {
return true;
}
}
return false;
}
bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
if (_reset_forbidden(pin)) {
return true;
}
// Other reset variations would go here.
return false;
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -44,17 +44,26 @@ void reset_all_pins(void) {
if (never_reset_pins[pin->mux_idx]) {
continue;
}
*(uint32_t *)pin->mux_reg = pin->mux_reset;
*(uint32_t *)pin->cfg_reg = pin->pad_reset;
common_hal_reset_pin(pin);
}
}
MP_WEAK bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) {
return false;
}
// Since i.MX pins need extra register and reset information to reset properly,
// resetting pins by number alone has been removed.
void common_hal_reset_pin(const mcu_pin_obj_t *pin) {
if (pin == NULL) {
return;
}
// Give the board a chance to reset the pin in a particular way, or not reset it at all.
if (mimxrt10xx_board_reset_pin_number(pin)) {
return;
}
never_reset_pins[pin->mux_idx] = false;
claimed_pins[pin->mux_idx] = false;
*(uint32_t *)pin->mux_reg = pin->mux_reset;

View File

@ -35,4 +35,11 @@
void reset_all_pins(void);
void claim_pin(const mcu_pin_obj_t *pin);
// Allow the board to reset a pin in a board-specific way. This can be used
// for LEDs or enable pins to put them in a state beside the default pull-up,
// or to simply not reset the pin at all.
// Return true to indicate that the pin was handled in a special way. Returning false will lead to
// the port-default reset behavior.
extern bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin);
#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_MICROCONTROLLER_PIN_H