|
| 1 | +/* |
| 2 | + * This file is part of the MicroPython project, http://micropython.org/ |
| 3 | + * |
| 4 | + * The MIT License (MIT) |
| 5 | + * |
| 6 | + * Copyright (c) 2016 Glenn Ruben Bakke |
| 7 | + * Copyright (c) 2018 Dan Halbert for Adafruit Industries |
| 8 | + * |
| 9 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 10 | + * of this software and associated documentation files (the "Software"), to deal |
| 11 | + * in the Software without restriction, including without limitation the rights |
| 12 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 13 | + * copies of the Software, and to permit persons to whom the Software is |
| 14 | + * furnished to do so, subject to the following conditions: |
| 15 | + * |
| 16 | + * The above copyright notice and this permission notice shall be included in |
| 17 | + * all copies or substantial portions of the Software. |
| 18 | + * |
| 19 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 20 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 21 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 22 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 23 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 24 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 25 | + * THE SOFTWARE. |
| 26 | + */ |
| 27 | + |
| 28 | +#include "nrfx/hal/nrf_gpio.h" |
| 29 | + |
| 30 | +#define MICROPY_HW_BOARD_NAME "TG-Techie's TG-Watch02A" |
| 31 | +#define MICROPY_HW_MCU_NAME "nRF52840" |
| 32 | + |
| 33 | +#define MICROPY_HW_LED_STATUS (&pin_P0_07) |
| 34 | + |
| 35 | +#if QSPI_FLASH_FILESYSTEM |
| 36 | +#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 17) |
| 37 | +#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 22) |
| 38 | +#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 23) |
| 39 | +#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(0, 21) |
| 40 | +#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 19) |
| 41 | +#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 20) |
| 42 | +#endif |
| 43 | + |
| 44 | +#if SPI_FLASH_FILESYSTEM |
| 45 | +#define SPI_FLASH_MOSI_PIN &pin_P0_17 |
| 46 | +#define SPI_FLASH_MISO_PIN &pin_P0_22 |
| 47 | +#define SPI_FLASH_SCK_PIN &pin_P0_19 |
| 48 | +#define SPI_FLASH_CS_PIN &pin_P0_20 |
| 49 | +#endif |
| 50 | + |
| 51 | +#define BOARD_HAS_CRYSTAL 0 |
| 52 | + |
| 53 | +#define DEFAULT_I2C_BUS_SCL (&pin_P0_11) |
| 54 | +#define DEFAULT_I2C_BUS_SDA (&pin_P0_12) |
| 55 | + |
| 56 | +#define DEFAULT_SPI_BUS_SCK (&pin_P0_14) |
| 57 | +#define DEFAULT_SPI_BUS_MOSI (&pin_P0_13) |
| 58 | +#define DEFAULT_SPI_BUS_MISO (&pin_P0_15) |
| 59 | + |
| 60 | +#define DEFAULT_UART_BUS_RX (&pin_P0_24) |
| 61 | +#define DEFAULT_UART_BUS_TX (&pin_P0_25) |
0 commit comments