Skip to content

Commit c7e5626

Browse files
machdyneinc
andauthored
add support for machdyne werkzeug rp2040 board (raspberrypi#2023)
* add support for machdyne werkzeug rp2040 board * boards/machdyne_werkzeug: set default flash size for cmake --------- Co-authored-by: inc <[email protected]>
1 parent 68778b1 commit c7e5626

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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+
// pico_cmake_set PICO_PLATFORM=rp2040
13+
14+
#ifndef _BOARDS_MACHDYNE_WERKZEUG_H
15+
#define _BOARDS_MACHDYNE_WERKZEUG_H
16+
17+
// For board detection
18+
#define MACHDYNE_WERKZEUG
19+
20+
// On some samples, the xosc can take longer to stabilize than is usual
21+
#ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER
22+
#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64
23+
#endif
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 20
39+
#define PICO_DEFAULT_LED_PIN_INVERTED 1
40+
#endif
41+
42+
// --- I2C ---
43+
#ifndef PICO_DEFAULT_I2C
44+
#define PICO_DEFAULT_I2C 0
45+
#endif
46+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
47+
#define PICO_DEFAULT_I2C_SDA_PIN 4
48+
#endif
49+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
50+
#define PICO_DEFAULT_I2C_SCL_PIN 5
51+
#endif
52+
53+
// --- SPI ---
54+
#ifndef PICO_DEFAULT_SPI
55+
#define PICO_DEFAULT_SPI 0
56+
#endif
57+
#ifndef PICO_DEFAULT_SPI_SCK_PIN
58+
#define PICO_DEFAULT_SPI_SCK_PIN 18
59+
#endif
60+
#ifndef PICO_DEFAULT_SPI_TX_PIN
61+
#define PICO_DEFAULT_SPI_TX_PIN 19
62+
#endif
63+
#ifndef PICO_DEFAULT_SPI_RX_PIN
64+
#define PICO_DEFAULT_SPI_RX_PIN 16
65+
#endif
66+
#ifndef PICO_DEFAULT_SPI_CSN_PIN
67+
#define PICO_DEFAULT_SPI_CSN_PIN 17
68+
#endif
69+
70+
// --- FLASH ---
71+
72+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
73+
74+
#ifndef PICO_FLASH_SPI_CLKDIV
75+
#define PICO_FLASH_SPI_CLKDIV 2
76+
#endif
77+
78+
// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (1 * 1024 * 1024)
79+
#ifndef PICO_FLASH_SIZE_BYTES
80+
#define PICO_FLASH_SIZE_BYTES (1 * 1024 * 1024)
81+
#endif
82+
83+
#ifndef PICO_RP2040_B0_SUPPORTED
84+
#define PICO_RP2040_B0_SUPPORTED 1
85+
#endif
86+
87+
#endif

0 commit comments

Comments
 (0)