Skip to content

Commit e379f67

Browse files
authored
Add board definition for RP2040 Stamp and Carrier (earlephilhower#696)
1 parent 91462e4 commit e379f67

File tree

2 files changed

+112
-0
lines changed

2 files changed

+112
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/*
2+
* Copyright (c) 2022 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+
//------------------------------------------------------------------------------------------
13+
// Board definition for the Solder Party RP2040 Stamp
14+
//
15+
// This header may be included by other board headers as "boards/solderparty_rp2040_stamp.h"
16+
17+
#ifndef _BOARDS_SOLDERPARTY_RP2040_STAMP_H
18+
#define _BOARDS_SOLDERPARTY_RP2040_STAMP_H
19+
20+
// For board detection
21+
#define SOLDERPARTY_RP2040_STAMP
22+
23+
// --- UART ---
24+
#ifndef PICO_DEFAULT_UART
25+
#define PICO_DEFAULT_UART 0
26+
#endif
27+
#ifndef PICO_DEFAULT_UART_TX_PIN
28+
#define PICO_DEFAULT_UART_TX_PIN 0
29+
#endif
30+
#ifndef PICO_DEFAULT_UART_RX_PIN
31+
#define PICO_DEFAULT_UART_RX_PIN 1
32+
#endif
33+
34+
// --- Neopixel ---
35+
#ifndef PICO_DEFAULT_WS2812_PIN
36+
#define PICO_DEFAULT_WS2812_PIN 21
37+
#endif
38+
39+
// --- I2C ---
40+
#ifndef PICO_DEFAULT_I2C
41+
#define PICO_DEFAULT_I2C 0
42+
#endif
43+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
44+
#define PICO_DEFAULT_I2C_SDA_PIN 4
45+
#endif
46+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
47+
#define PICO_DEFAULT_I2C_SCL_PIN 5
48+
#endif
49+
50+
// --- SPI ---
51+
#ifndef PICO_DEFAULT_SPI
52+
#define PICO_DEFAULT_SPI 0
53+
#endif
54+
#ifndef PICO_DEFAULT_SPI_SCK_PIN
55+
#define PICO_DEFAULT_SPI_SCK_PIN 18
56+
#endif
57+
#ifndef PICO_DEFAULT_SPI_TX_PIN
58+
#define PICO_DEFAULT_SPI_TX_PIN 19
59+
#endif
60+
#ifndef PICO_DEFAULT_SPI_RX_PIN
61+
#define PICO_DEFAULT_SPI_RX_PIN 16
62+
#endif
63+
#ifndef PICO_DEFAULT_SPI_CSN_PIN
64+
#define PICO_DEFAULT_SPI_CSN_PIN 17
65+
#endif
66+
67+
// --- FLASH ---
68+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
69+
70+
#ifndef PICO_FLASH_SPI_CLKDIV
71+
#define PICO_FLASH_SPI_CLKDIV 2
72+
#endif
73+
74+
#ifndef PICO_FLASH_SIZE_BYTES
75+
#define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024)
76+
#endif
77+
78+
// All production boards have B1 RP2040
79+
#ifndef PICO_RP2040_B0_SUPPORTED
80+
#define PICO_RP2040_B0_SUPPORTED 0
81+
#endif
82+
83+
#endif
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2022 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+
//------------------------------------------------------------------------------------------
13+
// Board definition for the Solder Party RP2040 Stamp Carrier
14+
//
15+
// This header may be included by other board headers as "boards/solderparty_rp2040_stamp_carrier.h"
16+
17+
#ifndef _BOARDS_SOLDERPARTY_RP2040_STAMP_CARRIER_H
18+
#define _BOARDS_SOLDERPARTY_RP2040_STAMP_CARRIER_H
19+
20+
// For board detection
21+
#define SOLDERPARTY_RP2040_STAMP_CARRIER
22+
23+
#ifndef PICO_DEFAULT_LED_PIN
24+
#define PICO_DEFAULT_LED_PIN 20
25+
#endif
26+
27+
#include "solderparty_rp2040_stamp.h"
28+
29+
#endif

0 commit comments

Comments
 (0)