|
| 1 | +/* |
| 2 | + * The MIT License (MIT) |
| 3 | + * |
| 4 | + * Copyright (c) 2025 Ha Thach (tinyusb.org) |
| 5 | + * |
| 6 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | + * of this software and associated documentation files (the "Software"), to deal |
| 8 | + * in the Software without restriction, including without limitation the rights |
| 9 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | + * copies of the Software, and to permit persons to whom the Software is |
| 11 | + * furnished to do so, subject to the following conditions: |
| 12 | + * |
| 13 | + * The above copyright notice and this permission notice shall be included in |
| 14 | + * all copies or substantial portions of the Software. |
| 15 | + * |
| 16 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 | + * THE SOFTWARE. |
| 23 | + * |
| 24 | + * This file is part of the TinyUSB stack. |
| 25 | + */ |
| 26 | +#ifndef BOARDS_ADAFRUIT_METRO_RP2350_H |
| 27 | +#define BOARDS_ADAFRUIT_METRO_RP2350_H |
| 28 | + |
| 29 | +// required for board that is not part of pico-sdk |
| 30 | + |
| 31 | +// ----------------------------------------------------- |
| 32 | +// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO |
| 33 | +// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES |
| 34 | +// ----------------------------------------------------- |
| 35 | + |
| 36 | +// pico_cmake_set PICO_PLATFORM=rp2350 |
| 37 | + |
| 38 | +// On some samples, the xosc can take longer to stabilize than is usual |
| 39 | +#ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER |
| 40 | +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 |
| 41 | +#endif |
| 42 | + |
| 43 | +// For board detection |
| 44 | +#define ADAFRUIT_METRO_RP2350 |
| 45 | + |
| 46 | +// --- RP2350 VARIANT --- |
| 47 | +#define PICO_RP2350A 0 |
| 48 | + |
| 49 | +// --- UART --- |
| 50 | +#ifndef PICO_DEFAULT_UART |
| 51 | +#define PICO_DEFAULT_UART 0 |
| 52 | +#endif |
| 53 | +#ifndef PICO_DEFAULT_UART_TX_PIN |
| 54 | +#define PICO_DEFAULT_UART_TX_PIN 0 |
| 55 | +#endif |
| 56 | +#ifndef PICO_DEFAULT_UART_RX_PIN |
| 57 | +#define PICO_DEFAULT_UART_RX_PIN 1 |
| 58 | +#endif |
| 59 | + |
| 60 | +// --- LED --- |
| 61 | +#ifndef PICO_DEFAULT_LED_PIN |
| 62 | +#define PICO_DEFAULT_LED_PIN 23 |
| 63 | +#endif |
| 64 | + |
| 65 | +#ifndef PICO_DEFAULT_WS2812_PIN |
| 66 | +#define PICO_DEFAULT_WS2812_PIN 25 |
| 67 | +#endif |
| 68 | + |
| 69 | +// --- I2C --- |
| 70 | +#ifndef PICO_DEFAULT_I2C |
| 71 | +#define PICO_DEFAULT_I2C 0 |
| 72 | +#endif |
| 73 | +#ifndef PICO_DEFAULT_I2C_SDA_PIN |
| 74 | +#define PICO_DEFAULT_I2C_SDA_PIN 20 |
| 75 | +#endif |
| 76 | +#ifndef PICO_DEFAULT_I2C_SCL_PIN |
| 77 | +#define PICO_DEFAULT_I2C_SCL_PIN 21 |
| 78 | +#endif |
| 79 | + |
| 80 | +// --- SPI --- |
| 81 | +#ifndef PICO_DEFAULT_SPI |
| 82 | +#define PICO_DEFAULT_SPI 1 |
| 83 | +#endif |
| 84 | +#ifndef PICO_DEFAULT_SPI_SCK_PIN |
| 85 | +#define PICO_DEFAULT_SPI_SCK_PIN 30 |
| 86 | +#endif |
| 87 | +#ifndef PICO_DEFAULT_SPI_TX_PIN |
| 88 | +#define PICO_DEFAULT_SPI_TX_PIN 31 |
| 89 | +#endif |
| 90 | +#ifndef PICO_DEFAULT_SPI_RX_PIN |
| 91 | +#define PICO_DEFAULT_SPI_RX_PIN 28 |
| 92 | +#endif |
| 93 | + |
| 94 | +// --- FLASH --- |
| 95 | + |
| 96 | +// FruitJam use w25q128 but sdk does not have .s for it, use q080 instead |
| 97 | +#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1 |
| 98 | + |
| 99 | +#ifndef PICO_FLASH_SPI_CLKDIV |
| 100 | +#define PICO_FLASH_SPI_CLKDIV 2 |
| 101 | +#endif |
| 102 | + |
| 103 | +// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024) |
| 104 | +#ifndef PICO_FLASH_SIZE_BYTES |
| 105 | +#define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024) |
| 106 | +#endif |
| 107 | + |
| 108 | +// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1 |
| 109 | +#ifndef PICO_RP2350_A2_SUPPORTED |
| 110 | +#define PICO_RP2350_A2_SUPPORTED 1 |
| 111 | +#endif |
| 112 | + |
| 113 | +#endif |
0 commit comments