|
| 1 | + |
| 2 | +#ifndef Pins_Arduino_h |
| 3 | +#define Pins_Arduino_h |
| 4 | + |
| 5 | +#include <stdint.h> |
| 6 | +#include "soc/soc_caps.h" |
| 7 | + |
| 8 | +static const uint8_t TX = 1; |
| 9 | +static const uint8_t RX = 3; |
| 10 | + |
| 11 | +static const uint8_t D35 = 35; |
| 12 | +static const uint8_t D22 = 22; |
| 13 | +static const uint8_t D27 = 27; |
| 14 | +static const uint8_t D21 = 21; |
| 15 | + |
| 16 | +static const uint8_t A6 = 34; |
| 17 | +static const uint8_t A17 = 27; |
| 18 | + |
| 19 | +static const uint8_t T7 = 27; |
| 20 | + |
| 21 | +static const uint8_t SDA = 21; |
| 22 | +static const uint8_t SCL = 22; |
| 23 | + |
| 24 | +static const uint8_t SS = 5; |
| 25 | +static const uint8_t MOSI = 23; |
| 26 | +static const uint8_t MISO = 19; |
| 27 | +static const uint8_t SCK = 18; |
| 28 | + |
| 29 | +#define CYD_TP_IRQ 36 |
| 30 | +#define CYD_TP_MOSI 32 |
| 31 | +#define CYD_TP_MISO 39 |
| 32 | +#define CYD_TP_CLK 25 |
| 33 | +#define CYD_TP_CS 33 |
| 34 | +#define CYD_TP_DIN CYD_TP_MOSI |
| 35 | +#define CYD_TP_OUT CYD_TP_MOSI |
| 36 | +#define CYD_TP_SPI_BUS VSPI |
| 37 | + |
| 38 | +#define CYD_TFT_DC 2 |
| 39 | +#define CYD_TFT_MISO 12 |
| 40 | +#define CYD_TFT_MOSI 13 |
| 41 | +#define CYD_TFT_SCK 14 |
| 42 | +#define CYD_TFT_CS 15 |
| 43 | +#define CYD_TFT_RS CYD_TFT_DC |
| 44 | +#define CYD_TFT_SDO CYD_TFT_MISO |
| 45 | +#define CYD_TFT_SDI CYD_TFT_MOSI |
| 46 | +#define CYD_TFT_SPI_BUS HSPI |
| 47 | + |
| 48 | +#define CYD_TFT_WIDTH 320 |
| 49 | +#define CYD_TFT_HEIGHT 240 |
| 50 | +#define CYD_SCREEN_WIDTH CYD_TFT_WIDTH |
| 51 | +#define CYD_SCREEN_HEIGHT CYD_TFT_HEIGHT |
| 52 | + |
| 53 | +#define CYD_TFT_BL 21 |
| 54 | +#define CYD_TFT_BL_ENABLE ( ( pinMode( CYD_TFT_BL, OUTPUT ) ) ) |
| 55 | +#define CYD_TFT_BL_OFF ( digitalWrite( CYD_TFT_BL, 0 ) ) |
| 56 | +#define CYD_TFT_BL_ON ( digitalWrite( CYD_TFT_BL, 1 ) ) |
| 57 | + |
| 58 | +#define CYD_LED_RED 4 |
| 59 | +#define CYD_LED_GREEN 16 |
| 60 | +#define CYD_LED_BLUE 17 |
| 61 | + |
| 62 | +#define CYD_AUDIO_OUT 26 |
| 63 | + |
| 64 | +#define CYD_USER_BUTTON 0 |
| 65 | + |
| 66 | +#define CYD_SD_SS 5 |
| 67 | +#define CYD_SD_MOSI 23 |
| 68 | +#define CYD_SD_MISO 19 |
| 69 | +#define CYD_SD_SCK 18 |
| 70 | +#define CYD_SD_SPI_BUS VSPI |
| 71 | + |
| 72 | +#define CYD_LDR 34 |
| 73 | + |
| 74 | +#define CYD_LED_RED_OFF ( digitalWrite( CYD_LED_RED, 1 ) ) |
| 75 | +#define CYD_LED_RED_ON ( digitalWrite( CYD_LED_RED, 0 ) ) |
| 76 | +#define CYD_LED_GREEN_OFF ( digitalWrite( CYD_LED_GREEN, 1 ) ) |
| 77 | +#define CYD_LED_GREEN_ON ( digitalWrite( CYD_LED_GREEN, 0 ) ) |
| 78 | +#define CYD_LED_BLUE_OFF ( digitalWrite( CYD_LED_BLUE, 1 ) ) |
| 79 | +#define CYD_LED_BLUE_ON ( digitalWrite( CYD_LED_BLUE, 0 ) ) |
| 80 | +#define CYD_LED_RGB_OFF CYD_LED_RED_OFF; CYD_LED_GREEN_OFF; CYD_LED_BLUE_OFF |
| 81 | +#define CYD_LED_RGB_ON CYD_LED_RED_ON; CYD_LED_GREEN_ON; CYD_LED_BLUE_ON |
| 82 | +#define CYD_LED_WHITE_OFF CYD_LED_RGB_OFF |
| 83 | +#define CYD_LED_WHITE_ON CYD_LED_RGB_ON |
| 84 | + |
| 85 | +#endif /* Pins_Arduino_h */ |
0 commit comments