Reorder pin definitions for clarity
This commit is contained in:
parent
378481c37c
commit
1b00926266
2 changed files with 25 additions and 18 deletions
|
@ -4,18 +4,18 @@
|
|||
#endif
|
||||
|
||||
// Board GPIO pin mapping
|
||||
// #define LED0 16 // Power on indicator
|
||||
#define LED1 16 // Status 1 / Wifi signal 1
|
||||
#define LED2 2 // Wifi signal 2
|
||||
#define LED3 12 // Wifi signal 3
|
||||
#define LED4 13 // Wifi signal 4
|
||||
#define SWITCH_PIN 0 // GPIO0 (programming mode pin)
|
||||
|
||||
//#define LED0 16 // Power on indicator
|
||||
#define LED1 16 // Status 1 / Wifi signal 1
|
||||
#define LED2 2 // Wifi signal 2
|
||||
#define LED3 12 // Wifi signal 3
|
||||
#define LED4 13 // Wifi signal 4
|
||||
|
||||
#define DCD_PIN 14 // DCD Carrier Status
|
||||
#define RTS_PIN 4 // RTS Request to Send, connect to host's CTS pin
|
||||
#define CTS_PIN 5 // CTS Clear to Send, connect to host's RTS pin
|
||||
|
||||
#define SWITCH_PIN 0 // GPIO0 (programming mode pin)
|
||||
|
||||
// Default speed dial list
|
||||
#define SPEEDDIAL0 "heatwavebbs.com:9640"
|
||||
#define SPEEDDIAL1 "bbs.fozztexx.com:23"
|
||||
|
|
29
src/main.cpp
29
src/main.cpp
|
@ -481,10 +481,24 @@ void storeSpeedDial(byte num, String location) {
|
|||
*/
|
||||
void setup() {
|
||||
pinMode(LED1, OUTPUT);
|
||||
digitalWrite(LED1, LOW); // off
|
||||
pinMode(LED2, OUTPUT);
|
||||
digitalWrite(LED2, LOW); // off
|
||||
pinMode(LED3, OUTPUT);
|
||||
digitalWrite(LED3, LOW); // off
|
||||
pinMode(LED4, OUTPUT);
|
||||
digitalWrite(LED4, LOW); // off
|
||||
|
||||
pinMode(SWITCH_PIN, INPUT);
|
||||
digitalWrite(SWITCH_PIN, HIGH);
|
||||
pinMode(DCD_PIN, OUTPUT);
|
||||
pinMode(RTS_PIN, OUTPUT);
|
||||
digitalWrite(RTS_PIN, HIGH);
|
||||
pinMode(CTS_PIN, INPUT);
|
||||
setCarrier(false);
|
||||
|
||||
delay(100);
|
||||
|
||||
for (int cnt = 0; cnt < 3; cnt++) {
|
||||
digitalWrite(LED1, HIGH); // off
|
||||
delay(100);
|
||||
|
@ -499,19 +513,12 @@ void setup() {
|
|||
delay(100);
|
||||
digitalWrite(LED4, LOW); // on
|
||||
}
|
||||
|
||||
digitalWrite(LED2, LOW); // off
|
||||
digitalWrite(LED1, HIGH); // on
|
||||
pinMode(SWITCH_PIN, INPUT);
|
||||
digitalWrite(SWITCH_PIN, HIGH);
|
||||
pinMode(DCD_PIN, OUTPUT);
|
||||
pinMode(RTS_PIN, OUTPUT);
|
||||
digitalWrite(RTS_PIN, HIGH); // ready to receive data
|
||||
pinMode(CTS_PIN, INPUT);
|
||||
//digitalWrite(CTS_PIN, HIGH); // pull up
|
||||
setCarrier(false);
|
||||
digitalWrite(LED2, LOW); // off
|
||||
digitalWrite(LED3, LOW); // off
|
||||
digitalWrite(LED3, LOW); // off
|
||||
|
||||
EEPROM.begin(LAST_ADDRESS + 1);
|
||||
EEPROM.begin(LAST_ADDRESS + 1);
|
||||
delay(10);
|
||||
|
||||
if (EEPROM.read(VERSION_ADDRESS) != VERSIONA || EEPROM.read(VERSION_ADDRESS + 1) != VERSIONB) {
|
||||
|
|
Loading…
Reference in a new issue