Skip to content

Commit c44e62d

Browse files
Added board definition (#471)
1 parent bba0420 commit c44e62d

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-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) 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+
#ifndef _BOARDS_PIMORONI_PGA2040_H
13+
#define _BOARDS_PIMORONI_PGA2040_H
14+
15+
// For board detection
16+
#define PIMORONI_PGA2040
17+
18+
// --- UART ---
19+
#ifndef PICO_DEFAULT_UART
20+
#define PICO_DEFAULT_UART 0
21+
#endif
22+
23+
#ifndef PICO_DEFAULT_UART_TX_PIN
24+
#define PICO_DEFAULT_UART_TX_PIN 0
25+
#endif
26+
27+
#ifndef PICO_DEFAULT_UART_RX_PIN
28+
#define PICO_DEFAULT_UART_RX_PIN 1
29+
#endif
30+
31+
// --- LED ---
32+
// no PICO_DEFAULT_LED_PIN
33+
// no PICO_DEFAULT_WS2812_PIN
34+
35+
// --- I2C ---
36+
#ifndef PICO_DEFAULT_I2C
37+
#define PICO_DEFAULT_I2C 0
38+
#endif
39+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
40+
#define PICO_DEFAULT_I2C_SDA_PIN 4
41+
#endif
42+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
43+
#define PICO_DEFAULT_I2C_SCL_PIN 5
44+
#endif
45+
46+
// --- SPI ---
47+
#ifndef PICO_DEFAULT_SPI
48+
#define PICO_DEFAULT_SPI 0
49+
#endif
50+
#ifndef PICO_DEFAULT_SPI_SCK_PIN
51+
#define PICO_DEFAULT_SPI_SCK_PIN 18
52+
#endif
53+
#ifndef PICO_DEFAULT_SPI_TX_PIN
54+
#define PICO_DEFAULT_SPI_TX_PIN 19
55+
#endif
56+
#ifndef PICO_DEFAULT_SPI_RX_PIN
57+
#define PICO_DEFAULT_SPI_RX_PIN 16
58+
#endif
59+
#ifndef PICO_DEFAULT_SPI_CSN_PIN
60+
#define PICO_DEFAULT_SPI_CSN_PIN 17
61+
#endif
62+
63+
// --- FLASH ---
64+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
65+
66+
#ifndef PICO_FLASH_SPI_CLKDIV
67+
#define PICO_FLASH_SPI_CLKDIV 2
68+
#endif
69+
70+
#ifndef PICO_FLASH_SIZE_BYTES
71+
#define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024)
72+
#endif
73+
74+
// All boards have B1 RP2040
75+
#ifndef PICO_FLOAT_SUPPORT_ROM_V1
76+
#define PICO_FLOAT_SUPPORT_ROM_V1 0
77+
#endif
78+
79+
#ifndef PICO_DOUBLE_SUPPORT_ROM_V1
80+
#define PICO_DOUBLE_SUPPORT_ROM_V1 0
81+
#endif
82+
83+
#endif

0 commit comments

Comments
 (0)