Skip to content

Commit 6149b9e

Browse files
authored
Add board definition for Seeed Xiao RP2040 (earlephilhower#691)
* Add board definition for Seeed Xiao RP2040 https://www.seeedstudio.com/XIAO-RP2040-v1-0-p-5026.html https://wiki.seeedstudio.com/XIAO-RP2040/
1 parent 8554fc4 commit 6149b9e

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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_SEEED_XIAO_RP2040_H
13+
#define _BOARDS_SEEED_XIAO_RP2040_H
14+
15+
// For board detection
16+
#define SEEED_XIAO_RP2040
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 25
39+
#endif
40+
41+
#ifndef PICO_DEFAULT_LED_PIN_INVERTED
42+
#define PICO_DEFAULT_LED_PIN_INVERTED 1
43+
#endif
44+
45+
#ifndef PICO_DEFAULT_WS2812_PIN
46+
#define PICO_DEFAULT_WS2812_PIN 12
47+
#endif
48+
49+
#ifndef PICO_DEFAULT_WS2812_POWER_PIN
50+
#define PICO_DEFAULT_WS2812_POWER_PIN 11
51+
#endif
52+
53+
//------------- I2C -------------//
54+
#ifndef PICO_DEFAULT_I2C
55+
#define PICO_DEFAULT_I2C 1
56+
#endif
57+
58+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
59+
#define PICO_DEFAULT_I2C_SDA_PIN 6
60+
#endif
61+
62+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
63+
#define PICO_DEFAULT_I2C_SCL_PIN 7
64+
#endif
65+
66+
//------------- SPI -------------//
67+
#ifndef PICO_DEFAULT_SPI
68+
#define PICO_DEFAULT_SPI 0
69+
#endif
70+
71+
#ifndef PICO_DEFAULT_SPI_TX_PIN
72+
#define PICO_DEFAULT_SPI_TX_PIN 3
73+
#endif
74+
75+
#ifndef PICO_DEFAULT_SPI_RX_PIN
76+
#define PICO_DEFAULT_SPI_RX_PIN 4
77+
#endif
78+
79+
#ifndef PICO_DEFAULT_SPI_SCK_PIN
80+
#define PICO_DEFAULT_SPI_SCK_PIN 2
81+
#endif
82+
83+
//------------- FLASH -------------//
84+
85+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
86+
87+
#ifndef PICO_FLASH_SPI_CLKDIV
88+
#define PICO_FLASH_SPI_CLKDIV 2
89+
#endif
90+
91+
#ifndef PICO_FLASH_SIZE_BYTES
92+
#define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024)
93+
#endif
94+
95+
// All boards have B1 RP2040
96+
#ifndef PICO_RP2040_B0_SUPPORTED
97+
#define PICO_RP2040_B0_SUPPORTED 0
98+
#endif
99+
100+
#endif

0 commit comments

Comments
 (0)