Skip to content

Commit 893a06b

Browse files
authored
Add UUGear Witty Pi 5 HAT+ board header file (#2518)
* Add UUGear Witty Pi 5 HAT+ board header file * Update uugear_wittypi5_hat_plus.h Fixes detected errors
1 parent dddb514 commit 893a06b

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* Copyright (c) 2025 Dun Cat B.V.(UUGear)
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/uugear_wittypi5_hat_plus.h"
13+
14+
#ifndef _BOARDS_UUGEAR_WITTYPI5_HAT_PLUS_H
15+
#define _BOARDS_UUGEAR_WITTYPI5_HAT_PLUS_H
16+
17+
pico_board_cmake_set(PICO_PLATFORM, rp2350)
18+
19+
// For board detection
20+
#define UUGEAR_WITTYPI5_HAT_PLUS
21+
22+
// --- RP2350 VARIANT ---
23+
#define PICO_RP2350A 1
24+
25+
// --- UART ---
26+
#ifndef PICO_DEFAULT_UART
27+
#define PICO_DEFAULT_UART 0
28+
#endif
29+
#ifndef PICO_DEFAULT_UART_TX_PIN
30+
#define PICO_DEFAULT_UART_TX_PIN 0
31+
#endif
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 22
39+
#endif
40+
41+
// --- I2C ---
42+
#ifndef PICO_DEFAULT_I2C
43+
#define PICO_DEFAULT_I2C 0
44+
#endif
45+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
46+
#define PICO_DEFAULT_I2C_SDA_PIN 4
47+
#endif
48+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
49+
#define PICO_DEFAULT_I2C_SCL_PIN 5
50+
#endif
51+
52+
// --- FLASH ---
53+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
54+
55+
#ifndef PICO_FLASH_SPI_CLKDIV
56+
#define PICO_FLASH_SPI_CLKDIV 2
57+
#endif
58+
59+
pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (16 * 1024 * 1024))
60+
#ifndef PICO_FLASH_SIZE_BYTES
61+
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
62+
#endif
63+
64+
pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1)
65+
#ifndef PICO_RP2350_A2_SUPPORTED
66+
#define PICO_RP2350_A2_SUPPORTED 1
67+
#endif
68+
69+
// Sometimes the xosc may take longer to stabilize
70+
#ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER
71+
#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64
72+
#endif
73+
74+
#endif

0 commit comments

Comments
 (0)