|
43 | 43 | #define D4 TKD4
|
44 | 44 | #define D5 TKD5
|
45 | 45 |
|
46 |
| -static const uint8_t RX = 0; |
47 |
| -static const uint8_t TX = 1; |
48 |
| -static const uint8_t SDA = 2; |
49 |
| -static const uint8_t SCL = 3; |
| 46 | +#define RX 0 |
| 47 | +#define TX 1 |
| 48 | +#define SDA 2 |
| 49 | +#define SCL 3 |
50 | 50 |
|
51 | 51 | // Map SPI port to 'new' pins D14..D17
|
52 |
| -static const uint8_t SS = 17; |
53 |
| -static const uint8_t MOSI = 16; |
54 |
| -static const uint8_t MISO = 14; |
55 |
| -static const uint8_t SCK = 15; |
| 52 | +#define SS 17 |
| 53 | +#define MOSI 16 |
| 54 | +#define MISO 14 |
| 55 | +#define SCK 15 |
56 | 56 |
|
57 | 57 | // Mapping of analog pins as digital I/O
|
58 | 58 | // A6-A11 share with digital pins
|
59 |
| -static const uint8_t A0 = 18; |
60 |
| -static const uint8_t A1 = 19; |
61 |
| -static const uint8_t A2 = 20; |
62 |
| -static const uint8_t A3 = 21; |
63 |
| -static const uint8_t A4 = 22; |
64 |
| -static const uint8_t A5 = 23; |
65 |
| -static const uint8_t A6 = 24; // D4 |
66 |
| -static const uint8_t A7 = 25; // D6 |
67 |
| -static const uint8_t A8 = 26; // D8 |
68 |
| -static const uint8_t A9 = 27; // D9 |
69 |
| -static const uint8_t A10 = 28; // D10 |
70 |
| -static const uint8_t A11 = 29; // D12 |
| 59 | +#define A0 18 |
| 60 | +#define A1 19 |
| 61 | +#define A2 20 |
| 62 | +#define A3 21 |
| 63 | +#define A4 22 |
| 64 | +#define A5 23 |
| 65 | +#define A6 24 // D4 |
| 66 | +#define A7 25 // D6 |
| 67 | +#define A8 26 // D8 |
| 68 | +#define A9 27 // D9 |
| 69 | +#define A10 28 // D10 |
| 70 | +#define A11 29 // D12 |
71 | 71 |
|
72 | 72 | // Specific Mapping for the Control Board
|
73 |
| -static const uint8_t KEY = 18; // AD0 |
74 |
| -static const uint8_t MUX_IN = 24; // ADC8 - A6 |
75 |
| -static const uint8_t MUXA = 6; // D5 - TKD4 |
76 |
| -static const uint8_t MUXB = 11; // D11 |
77 |
| -static const uint8_t MUXC = 12; // D12 - TKD5 |
78 |
| -static const uint8_t MUXD = 13; // D13 |
79 |
| -static const uint8_t BUZZ = 5; // D5 |
80 |
| -static const uint8_t POT = 23; // AD5 |
81 |
| -static const uint8_t DC_LCD = 10; // D10 |
82 |
| -static const uint8_t LCD_CS = 9; // D9 |
83 |
| -static const uint8_t RST_LCD = 7; // D6 |
84 |
| -static const uint8_t CARD_CS = 8; // D8 |
85 |
| -static const uint8_t TKD0 = 19; // ADC6 - A1 |
86 |
| -static const uint8_t TKD1 = 20; // ADC5 - A2 |
87 |
| -static const uint8_t TKD2 = 21; // ADC4 - A3 |
88 |
| -static const uint8_t TKD3 = 22; // ADC1 - A4 |
89 |
| -static const uint8_t TKD4 = 6; // D5 - MUXA |
90 |
| -static const uint8_t TKD5 = 12; // D12 - MUXC |
91 |
| -static const uint8_t LED1 = 17; // D17 - RX_Led |
| 73 | +#define KEY 18 // AD0 |
| 74 | +#define MUX_IN 24 // ADC8 - A6 |
| 75 | +#define MUXA 6 // D5 - TKD4 |
| 76 | +#define MUXB 11 // D11 |
| 77 | +#define MUXC 12 // D12 - TKD5 |
| 78 | +#define MUXD 13 // D13 |
| 79 | +#define BUZZ 5 // D5 |
| 80 | +#define POT 23 // AD5 |
| 81 | +#define DC_LCD 10 // D10 |
| 82 | +#define LCD_CS 9 // D9 |
| 83 | +#define RST_LCD 7 // D6 |
| 84 | +#define CARD_CS 8 // D8 |
| 85 | +#define TKD0 19 // ADC6 - A1 |
| 86 | +#define TKD1 20 // ADC5 - A2 |
| 87 | +#define TKD2 21 // ADC4 - A3 |
| 88 | +#define TKD3 22 // ADC1 - A4 |
| 89 | +#define TKD4 6 // D5 - MUXA |
| 90 | +#define TKD5 12 // D12 - MUXC |
| 91 | +#define LED1 17 // D17 - RX_Led |
92 | 92 |
|
93 | 93 | // __AVR_ATmega32U4__ has an unusual mapping of pins to channels
|
94 | 94 | extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
|
|
0 commit comments