1 | // espy Copyright (c) 2023 Josh Stockin <josh@joshstock.in> |
2 | // [https://joshstock.in] [https://github.com/joshuas3] |
3 | // |
4 | // This software is licensed and distributed under the terms of the MIT License. |
5 | // See the MIT License in the LICENSE file of this project's root folder. |
6 | // |
7 | // This comment block and its contents, including this disclaimer, MUST be |
8 | // preserved in all copies or distributions of this software's source. |
9 |
|
10 |
|
11 | // Filename: pins.h |
12 | // Description: GPIO pin definition header. |
13 | // |
14 | // Values >=40 are on expander board: |
15 | // 40-47 are GPA0-GPA7, 48-55 are GPB0-GPB8 |
16 | // |
17 | // The expander board is controlled via I2C interface. PIN_LED_RED is a |
18 | // reserved controller pin to indicate errors in case the I2C controller |
19 | // malfunctions. |
20 |
|
21 |
|
22 | #pragma once |
23 |
|
24 |
|
25 | // LEDs |
26 |
|
27 | #define LED_BLU 40 |
28 | #define LED_GRN 41 |
29 | #define LED_YEL 55 |
30 | #define LED_ORG 54 |
31 | #define LED_RED 12 |
32 |
|
33 |
|
34 | // Inputs/outputs/buses |
35 |
|
36 | #define SPI_DATA 13 |
37 | #define SPI_CLK 14 |
38 | #define I2C_DATA 21 |
39 | #define I2C_CLK 22 |
40 |
|
41 | #define CS_DIGIPOT 15 |
42 | #define CS_DISPLAY 26 |
43 |
|
44 | #define EPD_DC 4 |
45 | #define EPD_BUSY 16 |
46 |
|
47 | #define RADIO_PPM 25 |
48 |
|
49 | #define ROTARYENC_CLK 32 |
50 | #define ROTARYENC_DT 33 |
51 | #define ROTARYENC_SW 23 |
52 |
|
53 |
|
54 | // Sensors |
55 |
|
56 | #define SENS_HUMIDITY 5 |
57 | #define SENS_TEMP1 18 |
58 | #define SENS_TEMP2 27 |
59 | #define SENS_VOLT 34 |
60 |
|
61 |
|
62 | // Relays |
63 |
|
64 | #define RELAY_MOTOR_DRV_PWR 42 // U3-IN8 (SYM-PIN from schematic) |
65 | #define RELAY_MOTOR_DRV_RDIR 45 // U3-IN3 |
66 | #define RELAY_MOTOR_DRV_LDIR 46 // U3-IN2 |
67 | #define RELAY_MOTOR_DRV_SW 47 // U3-IN1 |
68 | |
69 | #define RELAY_SALTSPREAD 43 // U3-IN7 |
70 | #define RELAY_HEADLIGHTS 44 // U3-IN5 |
71 | |
72 | #define RELAY_MOTOR_UD_PWR 52 // U11-IN5 |
73 | #define RELAY_MOTOR_UD_CTL1 48 // U11-IN1 |
74 | #define RELAY_MOTOR_UD_CTL2 49 // U11-IN2 |
75 | |
76 | #define RELAY_MOTOR_LR_PWR 53 // U11-IN6 |
77 | #define RELAY_MOTOR_LR_CTL1 50 // U11-IN3 |
78 | #define RELAY_MOTOR_LR_CTL2 51 // U11-IN4 |
79 |
|