| 
 | 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/pimoroni_pico_plus2_w_rp2350.h"  | 
 | 13 | + | 
 | 14 | +// pico_cmake_set PICO_PLATFORM=rp2350  | 
 | 15 | +// pico_cmake_set PICO_CYW43_SUPPORTED = 1  | 
 | 16 | + | 
 | 17 | +#ifndef _BOARDS_PIMORONI_PICO_PLUS2_W_RP2350_H  | 
 | 18 | +#define _BOARDS_PIMORONI_PICO_PLUS2_W_RP2350_H  | 
 | 19 | + | 
 | 20 | +// For board detection  | 
 | 21 | +#define PIMORONI_PICO_PLUS2_W_RP2350  | 
 | 22 | + | 
 | 23 | +// --- BOARD SPECIFIC ---  | 
 | 24 | +#define PIMORONI_PICO_PLUS2_W_USER_SW_PIN 45  | 
 | 25 | +#define PIMORONI_PICO_PLUS2_W_PSRAM_CS_PIN 47  | 
 | 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 | +// no PICO_DEFAULT_LED_PIN - LED is on Wireless chip  | 
 | 40 | +// no PICO_DEFAULT_WS2812_PIN  | 
 | 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 = (16 * 1024 * 1024)  | 
 | 79 | +#ifndef PICO_FLASH_SIZE_BYTES  | 
 | 80 | +#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)  | 
 | 81 | +#endif  | 
 | 82 | + | 
 | 83 | +// The GPIO Pin used to monitor VSYS. Typically you would use this with ADC.  | 
 | 84 | +// There is an example in adc/read_vsys in pico-examples.  | 
 | 85 | +#ifndef PICO_VSYS_PIN  | 
 | 86 | +#define PICO_VSYS_PIN 43  | 
 | 87 | +#endif  | 
 | 88 | + | 
 | 89 | +// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1  | 
 | 90 | +#ifndef PICO_RP2350_A2_SUPPORTED  | 
 | 91 | +#define PICO_RP2350_A2_SUPPORTED 1  | 
 | 92 | +#endif  | 
 | 93 | + | 
 | 94 | +// --- CYW43 ---  | 
 | 95 | + | 
 | 96 | +// gpio pin to power up the cyw43 chip  | 
 | 97 | +#ifndef CYW43_DEFAULT_PIN_WL_REG_ON  | 
 | 98 | +#define CYW43_DEFAULT_PIN_WL_REG_ON 23  | 
 | 99 | +#endif  | 
 | 100 | + | 
 | 101 | +// gpio pin for spi data out to the cyw43 chip  | 
 | 102 | +#ifndef CYW43_DEFAULT_PIN_WL_DATA_OUT  | 
 | 103 | +#define CYW43_DEFAULT_PIN_WL_DATA_OUT 24  | 
 | 104 | +#endif  | 
 | 105 | + | 
 | 106 | +// gpio pin for spi data in from the cyw43 chip  | 
 | 107 | +#ifndef CYW43_DEFAULT_PIN_WL_DATA_IN  | 
 | 108 | +#define CYW43_DEFAULT_PIN_WL_DATA_IN 24  | 
 | 109 | +#endif  | 
 | 110 | + | 
 | 111 | +// gpio (irq) pin for the irq line from the cyw43 chip  | 
 | 112 | +#ifndef CYW43_DEFAULT_PIN_WL_HOST_WAKE  | 
 | 113 | +#define CYW43_DEFAULT_PIN_WL_HOST_WAKE 24  | 
 | 114 | +#endif  | 
 | 115 | + | 
 | 116 | +// gpio pin for the spi clock line to the cyw43 chip  | 
 | 117 | +#ifndef CYW43_DEFAULT_PIN_WL_CLOCK  | 
 | 118 | +#define CYW43_DEFAULT_PIN_WL_CLOCK 29  | 
 | 119 | +#endif  | 
 | 120 | + | 
 | 121 | +#ifndef CYW43_WL_GPIO_COUNT  | 
 | 122 | +#define CYW43_WL_GPIO_COUNT 3  | 
 | 123 | +#endif  | 
 | 124 | + | 
 | 125 | +#ifndef CYW43_WL_GPIO_LED_PIN  | 
 | 126 | +#define CYW43_WL_GPIO_LED_PIN 0  | 
 | 127 | +#endif  | 
 | 128 | + | 
 | 129 | +// If CYW43_WL_GPIO_VBUS_PIN is defined then a CYW43 GPIO has to be used to read VBUS.  | 
 | 130 | +// This can be passed to cyw43_arch_gpio_get to determine if the device is battery powered.  | 
 | 131 | +// PICO_VBUS_PIN and CYW43_WL_GPIO_VBUS_PIN should not both be defined.  | 
 | 132 | +#ifndef CYW43_WL_GPIO_VBUS_PIN  | 
 | 133 | +#define CYW43_WL_GPIO_VBUS_PIN 2  | 
 | 134 | +#endif  | 
 | 135 | + | 
 | 136 | +// If CYW43_USES_VSYS_PIN is defined then CYW43 uses the VSYS GPIO (defined by PICO_VSYS_PIN) for other purposes.  | 
 | 137 | +// If this is the case, to use the VSYS GPIO it's necessary to ensure CYW43 is not using it.  | 
 | 138 | +// This can be achieved by wrapping the use of the VSYS GPIO in cyw43_thread_enter / cyw43_thread_exit.  | 
 | 139 | +#ifndef CYW43_USES_VSYS_PIN  | 
 | 140 | +#define CYW43_USES_VSYS_PIN 1  | 
 | 141 | +#endif  | 
 | 142 | + | 
 | 143 | +#endif  | 
0 commit comments