circuitpython/ports/espressif/boards/lilygo_ttgo_t-oi-plus/board.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
898 B
C
Raw Normal View History

2022-05-12 13:18:39 -04:00
#include "shared-bindings/microcontroller/Pin.h"
#include "supervisor/board.h"
#include "components/driver/include/driver/gpio.h"
2022-05-12 17:46:49 -04:00
void board_init(void) {
2022-05-30 11:47:51 -04:00
// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO20);
common_hal_never_reset_pin(&pin_GPIO21);
#endif
2022-05-12 13:18:39 -04:00
}
bool board_requests_safe_mode(void) {
return false;
}
2022-05-30 11:47:51 -04:00
bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
// Pull LED down on reset rather than the default up
if (pin_number == MICROPY_HW_LED_STATUS->number) {
gpio_config_t cfg = {
.pin_bit_mask = BIT64(pin_number),
.mode = GPIO_MODE_DISABLE,
.pull_up_en = false,
.pull_down_en = true,
.intr_type = GPIO_INTR_DISABLE,
};
gpio_config(&cfg);
return true;
}
return false;
}
2022-05-12 13:18:39 -04:00
void reset_board(void) {
}
void board_deinit(void) {
}