Skip to content

Commit af9b47c

Browse files
authored
Add board definition for Adafruit Feather RP2040 with USB Type A Host (#1761)
1 parent b45632b commit af9b47c

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/*
2+
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
7+
// -----------------------------------------------------
8+
// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO
9+
// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES
10+
// -----------------------------------------------------
11+
12+
#ifndef _BOARDS_ADAFRUIT_FEATHER_RP2040_USB_HOST_H
13+
#define _BOARDS_ADAFRUIT_FEATHER_RP2040_USB_HOST_H
14+
15+
// For board detection
16+
#define ADAFRUIT_FEATHER_RP2040_USB_HOST
17+
18+
// On some samples, the xosc can take longer to stabilize than is usual
19+
#ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER
20+
#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64
21+
#endif
22+
23+
//------------- UART -------------//
24+
#ifndef PICO_DEFAULT_UART
25+
#define PICO_DEFAULT_UART 0
26+
#endif
27+
28+
#ifndef PICO_DEFAULT_UART_TX_PIN
29+
#define PICO_DEFAULT_UART_TX_PIN 0
30+
#endif
31+
32+
#ifndef PICO_DEFAULT_UART_RX_PIN
33+
#define PICO_DEFAULT_UART_RX_PIN 1
34+
#endif
35+
36+
//------------- LED -------------//
37+
#ifndef PICO_DEFAULT_LED_PIN
38+
#define PICO_DEFAULT_LED_PIN 13
39+
#endif
40+
41+
//------------- I2C -------------//
42+
#ifndef PICO_DEFAULT_I2C
43+
#define PICO_DEFAULT_I2C 1
44+
#endif
45+
46+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
47+
#define PICO_DEFAULT_I2C_SDA_PIN 2
48+
#endif
49+
50+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
51+
#define PICO_DEFAULT_I2C_SCL_PIN 3
52+
#endif
53+
54+
//------------- SPI -------------//
55+
#ifndef PICO_DEFAULT_SPI
56+
#define PICO_DEFAULT_SPI 1
57+
#endif
58+
59+
#ifndef PICO_DEFAULT_SPI_TX_PIN
60+
#define PICO_DEFAULT_SPI_TX_PIN 15
61+
#endif
62+
63+
#ifndef PICO_DEFAULT_SPI_RX_PIN
64+
#define PICO_DEFAULT_SPI_RX_PIN 8
65+
#endif
66+
67+
#ifndef PICO_DEFAULT_SPI_SCK_PIN
68+
#define PICO_DEFAULT_SPI_SCK_PIN 14
69+
#endif
70+
71+
//------------- FLASH -------------//
72+
73+
// Use slower generic flash access
74+
#define PICO_BOOT_STAGE2_CHOOSE_GENERIC_03H 1
75+
76+
#ifndef PICO_FLASH_SPI_CLKDIV
77+
#define PICO_FLASH_SPI_CLKDIV 4
78+
#endif
79+
80+
#ifndef PICO_FLASH_SIZE_BYTES
81+
#define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024)
82+
#endif
83+
84+
// All boards have B1 RP2040
85+
#ifndef PICO_RP2040_B0_SUPPORTED
86+
#define PICO_RP2040_B0_SUPPORTED 0
87+
#endif
88+
89+
#endif

0 commit comments

Comments
 (0)