Skip to content

Commit adb5c51

Browse files
author
Andrew Pochinchik
committed
Added Waveshare RP2350 PiZero board header
1 parent a1438df commit adb5c51

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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+
// This header may be included by other board headers as "boards/waveshare_rp2350_pizero.h"
13+
14+
#ifndef _BOARDS_WAVESHARE_RP2350_PIZERO_H
15+
#define _BOARDS_WAVESHARE_RP2350_PIZERO_H
16+
17+
pico_board_cmake_set(PICO_PLATFORM, rp2350)
18+
19+
// For board detection
20+
#define WAVESHARE_RP2350_PIZERO
21+
22+
// --- RP2350 VARIANT ---
23+
#define PICO_RP2350A 0
24+
25+
// --- UART ---
26+
#ifndef PICO_DEFAULT_UART
27+
#define PICO_DEFAULT_UART 1
28+
#endif
29+
#ifndef PICO_DEFAULT_UART_TX_PIN
30+
#define PICO_DEFAULT_UART_TX_PIN 4
31+
#endif
32+
#ifndef PICO_DEFAULT_UART_RX_PIN
33+
#define PICO_DEFAULT_UART_RX_PIN 5
34+
#endif
35+
36+
// --- I2C ---
37+
#ifndef PICO_DEFAULT_I2C
38+
#define PICO_DEFAULT_I2C 1
39+
#endif
40+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
41+
#define PICO_DEFAULT_I2C_SDA_PIN 2
42+
#endif
43+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
44+
#define PICO_DEFAULT_I2C_SCL_PIN 3
45+
#endif
46+
47+
// --- SPI ---
48+
#ifndef PICO_DEFAULT_SPI
49+
#define PICO_DEFAULT_SPI 1
50+
#endif
51+
#ifndef PICO_DEFAULT_SPI_SCK_PIN
52+
#define PICO_DEFAULT_SPI_SCK_PIN 10
53+
#endif
54+
#ifndef PICO_DEFAULT_SPI_TX_PIN
55+
#define PICO_DEFAULT_SPI_TX_PIN 11
56+
#endif
57+
#ifndef PICO_DEFAULT_SPI_RX_PIN
58+
#define PICO_DEFAULT_SPI_RX_PIN 12
59+
#endif
60+
#ifndef PICO_DEFAULT_SPI_CSN_PIN
61+
#define PICO_DEFAULT_SPI_CSN_PIN 13
62+
#endif
63+
64+
// --- FLASH ---
65+
66+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
67+
68+
#ifndef PICO_FLASH_SPI_CLKDIV
69+
#define PICO_FLASH_SPI_CLKDIV 2
70+
#endif
71+
72+
pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024))
73+
#ifndef PICO_FLASH_SIZE_BYTES
74+
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
75+
#endif
76+
77+
pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1)
78+
#ifndef PICO_RP2350_A2_SUPPORTED
79+
#define PICO_RP2350_A2_SUPPORTED 1
80+
#endif
81+
82+
#endif

0 commit comments

Comments
 (0)