File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
ports/espressif/boards/ai-thinker-esp32-cam Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 25
25
*/
26
26
27
27
#include "supervisor/board.h"
28
+
29
+ #include "mpconfigboard.h"
30
+ #include "shared-bindings/microcontroller/Pin.h"
31
+ #include "components/driver/gpio/include/driver/gpio.h"
32
+ #include "components/hal/include/hal/gpio_hal.h"
33
+ #include "common-hal/microcontroller/Pin.h"
34
+
35
+ void board_init (void ) {
36
+ reset_board ();
37
+ }
38
+
39
+ bool espressif_board_reset_pin_number (gpio_num_t pin_number ) {
40
+ // Pull one LED down on reset rather than the default up
41
+ if (pin_number == 4 ) { // This is the flashlight LED - very bright
42
+ gpio_config_t cfg = {
43
+ .pin_bit_mask = BIT64 (pin_number ),
44
+ .mode = GPIO_MODE_DISABLE ,
45
+ .pull_up_en = false,
46
+ .pull_down_en = true,
47
+ .intr_type = GPIO_INTR_DISABLE ,
48
+ };
49
+ gpio_config (& cfg );
50
+ return true;
51
+ }
52
+ return false;
53
+ }
You can’t perform that action at this time.
0 commit comments