File tree 2 files changed +30
-0
lines changed
ports/raspberrypi/boards/adafruit_metro_rp2350 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 4
4
//
5
5
// SPDX-License-Identifier: MIT
6
6
7
+ #include "common-hal/microcontroller/Pin.h"
8
+ #include "hardware/gpio.h"
9
+ #include "shared-bindings/usb_host/Port.h"
7
10
#include "supervisor/board.h"
8
11
9
12
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
13
+
14
+
15
+ #if defined(DEFAULT_USB_HOST_5V_POWER )
16
+ bool board_reset_pin_number (uint8_t pin_number ) {
17
+ if (pin_number == DEFAULT_USB_HOST_5V_POWER -> number ) {
18
+ // doing this (rather than gpio_init) in this specific order ensures no
19
+ // glitch if pin was already configured as a high output. gpio_init() temporarily
20
+ // configures the pin as an input, so the power enable value would potentially
21
+ // glitch.
22
+ gpio_put (pin_number , 1 );
23
+ gpio_set_dir (pin_number , GPIO_OUT );
24
+ gpio_set_function (pin_number , GPIO_FUNC_SIO );
25
+
26
+ return true;
27
+ }
28
+ return false;
29
+ }
30
+ #endif
31
+
32
+ #if defined(DEFAULT_USB_HOST_DATA_PLUS )
33
+ void board_init (void ) {
34
+ common_hal_usb_host_port_construct (DEFAULT_USB_HOST_DATA_PLUS , DEFAULT_USB_HOST_DATA_MINUS );
35
+ }
36
+ #endif
Original file line number Diff line number Diff line change 22
22
// #define CIRCUITPY_CONSOLE_UART_RX DEFAULT_UART_BUS_RX
23
23
// #define CIRCUITPY_CONSOLE_UART_TX DEFAULT_UART_BUS_TX
24
24
25
+ #define DEFAULT_USB_HOST_DATA_PLUS (&pin_GPIO32)
26
+ #define DEFAULT_USB_HOST_DATA_MINUS (&pin_GPIO33)
27
+ #define DEFAULT_USB_HOST_5V_POWER (&pin_GPIO29)
25
28
#define CIRCUITPY_PSRAM_CHIP_SELECT (&pin_GPIO47)
You can’t perform that action at this time.
0 commit comments