sparkfun_thingplus.h
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//------------------------------------------------------------------------------------------
13// Board definition for the SparkFun RP2040 Thing Plus
14//
15// This header may be included by other board headers as "boards/sparkfun_thingplus.h"
16
17#ifndef _BOARDS_SPARKFUN_THINGPLUS_H
18#define _BOARDS_SPARKFUN_THINGPLUS_H
19
20// For board detection
21#define SPARKFUN_THINGPLUS
22
23#ifndef PICO_DEFAULT_UART
24#define PICO_DEFAULT_UART 0
25#endif
26#ifndef PICO_DEFAULT_UART_TX_PIN
27#define PICO_DEFAULT_UART_TX_PIN 0
28#endif
29#ifndef PICO_DEFAULT_UART_RX_PIN
30#define PICO_DEFAULT_UART_RX_PIN 1
31#endif
32
33#ifndef PICO_DEFAULT_LED_PIN
34#define PICO_DEFAULT_LED_PIN 25
35#endif
36
37// Default I2C - for qwiic connector
38#ifndef PICO_DEFAULT_I2C
39#define PICO_DEFAULT_I2C 1
40#endif
41#ifndef PICO_DEFAULT_I2C_SDA_PIN
42#define PICO_DEFAULT_I2C_SDA_PIN 6
43#endif
44#ifndef PICO_DEFAULT_I2C_SCL_PIN
45#define PICO_DEFAULT_I2C_SCL_PIN 7
46#endif
47
48// --- SPI ---
49#ifndef PICO_DEFAULT_SPI
50#define PICO_DEFAULT_SPI 0
51#endif
52#ifndef PICO_DEFAULT_SPI_SCK_PIN
53#define PICO_DEFAULT_SPI_SCK_PIN 2
54#endif
55#ifndef PICO_DEFAULT_SPI_TX_PIN
56#define PICO_DEFAULT_SPI_TX_PIN 3
57#endif
58#ifndef PICO_DEFAULT_SPI_RX_PIN
59#define PICO_DEFAULT_SPI_RX_PIN 4
60#endif
61
62
63// spi flash
64
65#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
66
67#ifndef PICO_FLASH_SPI_CLKDIV
68#define PICO_FLASH_SPI_CLKDIV 2
69#endif
70
71#ifndef PICO_FLASH_SIZE_BYTES
72#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
73#endif
74
75// The thing plus has a SD Card.
76#define PICO_SD_CLK_PIN 14
77#define PICO_SD_CMD_PIN 15
78#define PICO_SD_DAT0_PIN 12
79// DAT pins count down
80#define PICO_SD_DAT_PIN_INCREMENT -1
81
82#ifndef PICO_SD_DAT_PIN_COUNT
83#define PICO_SD_DAT_PIN_COUNT 4
84#endif
85
86// All boards have B1 RP2040
87
88#ifndef PICO_RP2040_B0_SUPPORTED
89#define PICO_RP2040_B0_SUPPORTED 0
90#endif
91
92#endif