Skip to content

Commit 6ec9ea0

Browse files
Add WeAct RP2350A core board V10 (#2777)
Signed-off-by: Andy Lin <[email protected]>
1 parent e316b9b commit 6ec9ea0

2 files changed

Lines changed: 192 additions & 0 deletions

File tree

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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/weact_studio_rp2350a_core_v10_16mb.h"
13+
14+
#ifndef _BOARDS_WEACT_STUDIO_RP2350A_CORE_V10_16MB_H
15+
#define _BOARDS_WEACT_STUDIO_RP2350A_CORE_V10_16MB_H
16+
17+
pico_board_cmake_set(PICO_PLATFORM, rp2350)
18+
19+
// For board detection
20+
#define WEACT_STUDIO_RP2350A_CORE_V10_16MB
21+
22+
// --- BOARD SPECIFIC ---
23+
#define WEACT_STUDIO_USER_SW_PIN 23
24+
#define WEACT_STUDIO_LED1_PIN 24
25+
#define WEACT_STUDIO_LED2_PIN 25
26+
27+
// --- UART ---
28+
#ifndef PICO_DEFAULT_UART
29+
#define PICO_DEFAULT_UART 0
30+
#endif
31+
#ifndef PICO_DEFAULT_UART_TX_PIN
32+
#define PICO_DEFAULT_UART_TX_PIN 0
33+
#endif
34+
#ifndef PICO_DEFAULT_UART_RX_PIN
35+
#define PICO_DEFAULT_UART_RX_PIN 1
36+
#endif
37+
38+
// --- LED ---
39+
#ifndef PICO_DEFAULT_LED_PIN
40+
#define PICO_DEFAULT_LED_PIN 25
41+
#endif
42+
43+
#ifndef PICO_DEFAULT_LED1_PIN
44+
#define PICO_DEFAULT_LED1_PIN WEACT_STUDIO_LED1_PIN
45+
#endif
46+
47+
// --- I2C ---
48+
#ifndef PICO_DEFAULT_I2C
49+
#define PICO_DEFAULT_I2C 0
50+
#endif
51+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
52+
#define PICO_DEFAULT_I2C_SDA_PIN 4
53+
#endif
54+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
55+
#define PICO_DEFAULT_I2C_SCL_PIN 5
56+
#endif
57+
58+
// --- SPI ---
59+
#ifndef PICO_DEFAULT_SPI
60+
#define PICO_DEFAULT_SPI 0
61+
#endif
62+
#ifndef PICO_DEFAULT_SPI_SCK_PIN
63+
#define PICO_DEFAULT_SPI_SCK_PIN 18
64+
#endif
65+
#ifndef PICO_DEFAULT_SPI_TX_PIN
66+
#define PICO_DEFAULT_SPI_TX_PIN 19
67+
#endif
68+
#ifndef PICO_DEFAULT_SPI_RX_PIN
69+
#define PICO_DEFAULT_SPI_RX_PIN 16
70+
#endif
71+
#ifndef PICO_DEFAULT_SPI_CSN_PIN
72+
#define PICO_DEFAULT_SPI_CSN_PIN 17
73+
#endif
74+
75+
// --- FLASH ---
76+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
77+
78+
#ifndef PICO_FLASH_SPI_CLKDIV
79+
#define PICO_FLASH_SPI_CLKDIV 2
80+
#endif
81+
82+
pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024))
83+
#ifndef PICO_FLASH_SIZE_BYTES
84+
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
85+
#endif
86+
87+
// --- RP2350 VARIANT ---
88+
// This means RP2350B.
89+
#define PICO_RP2350A 1
90+
91+
pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1)
92+
#ifndef PICO_RP2350_A2_SUPPORTED
93+
#define PICO_RP2350_A2_SUPPORTED 1
94+
#endif
95+
96+
#endif
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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/weact_studio_rp2350a_core_v10_4mb.h"
13+
14+
#ifndef _BOARDS_WEACT_STUDIO_RP2350A_CORE_V10_4MB_H
15+
#define _BOARDS_WEACT_STUDIO_RP2350A_CORE_V10_4MB_H
16+
17+
pico_board_cmake_set(PICO_PLATFORM, rp2350)
18+
19+
// For board detection
20+
#define WEACT_STUDIO_RP2350A_CORE_V10_4MB
21+
22+
// --- BOARD SPECIFIC ---
23+
#define WEACT_STUDIO_USER_SW_PIN 23
24+
#define WEACT_STUDIO_LED1_PIN 24
25+
#define WEACT_STUDIO_LED2_PIN 25
26+
27+
// --- UART ---
28+
#ifndef PICO_DEFAULT_UART
29+
#define PICO_DEFAULT_UART 0
30+
#endif
31+
#ifndef PICO_DEFAULT_UART_TX_PIN
32+
#define PICO_DEFAULT_UART_TX_PIN 0
33+
#endif
34+
#ifndef PICO_DEFAULT_UART_RX_PIN
35+
#define PICO_DEFAULT_UART_RX_PIN 1
36+
#endif
37+
38+
// --- LED ---
39+
#ifndef PICO_DEFAULT_LED_PIN
40+
#define PICO_DEFAULT_LED_PIN 25
41+
#endif
42+
43+
#ifndef PICO_DEFAULT_LED1_PIN
44+
#define PICO_DEFAULT_LED1_PIN WEACT_STUDIO_LED1_PIN
45+
#endif
46+
47+
// --- I2C ---
48+
#ifndef PICO_DEFAULT_I2C
49+
#define PICO_DEFAULT_I2C 0
50+
#endif
51+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
52+
#define PICO_DEFAULT_I2C_SDA_PIN 4
53+
#endif
54+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
55+
#define PICO_DEFAULT_I2C_SCL_PIN 5
56+
#endif
57+
58+
// --- SPI ---
59+
#ifndef PICO_DEFAULT_SPI
60+
#define PICO_DEFAULT_SPI 0
61+
#endif
62+
#ifndef PICO_DEFAULT_SPI_SCK_PIN
63+
#define PICO_DEFAULT_SPI_SCK_PIN 18
64+
#endif
65+
#ifndef PICO_DEFAULT_SPI_TX_PIN
66+
#define PICO_DEFAULT_SPI_TX_PIN 19
67+
#endif
68+
#ifndef PICO_DEFAULT_SPI_RX_PIN
69+
#define PICO_DEFAULT_SPI_RX_PIN 16
70+
#endif
71+
#ifndef PICO_DEFAULT_SPI_CSN_PIN
72+
#define PICO_DEFAULT_SPI_CSN_PIN 17
73+
#endif
74+
75+
// --- FLASH ---
76+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
77+
78+
#ifndef PICO_FLASH_SPI_CLKDIV
79+
#define PICO_FLASH_SPI_CLKDIV 2
80+
#endif
81+
82+
pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (4 * 1024 * 1024))
83+
#ifndef PICO_FLASH_SIZE_BYTES
84+
#define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024)
85+
#endif
86+
87+
// --- RP2350 VARIANT ---
88+
// This means RP2350B.
89+
#define PICO_RP2350A 1
90+
91+
pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1)
92+
#ifndef PICO_RP2350_A2_SUPPORTED
93+
#define PICO_RP2350_A2_SUPPORTED 1
94+
#endif
95+
96+
#endif

0 commit comments

Comments
 (0)