Merge pull request #3692 from MadDoct/patch-3

Make tx and rx pins user selectable on the H801
This commit is contained in:
Theo Arends 2018-09-05 16:02:37 +02:00 committed by GitHub
commit ed1fd55d7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -2347,7 +2347,7 @@ void GpioInit()
if (mpin) pin[mpin] = i;
}
if (2 == pin[GPIO_TXD]) Serial.set_tx(2);
if ((2 == pin[GPIO_TXD]) || (H801 == Settings.module)) Serial.set_tx(2);
analogWriteRange(Settings.pwm_range); // Default is 1023 (Arduino.h)
analogWriteFreq(Settings.pwm_frequency); // Default is 1000 (core_esp8266_wiring_pwm.c)

View File

@ -550,8 +550,8 @@ const mytmplt kModules[MAXMODULE] PROGMEM = {
{ "H801", // Lixada H801 Wifi (ESP8266)
GPIO_USER, // GPIO00 E-FW Button
GPIO_LED1, // GPIO01 Green LED
GPIO_TXD, // GPIO02 RX - Pin next to TX on the PCB
GPIO_RXD, // GPIO03 TX - Pin next to GND on the PCB
GPIO_USER, // GPIO02 RX and Optional sensor - Pin next to TX on the PCB
GPIO_USER, // GPIO03 TX and Optional sensor - Pin next to GND on the PCB
GPIO_PWM5, // GPIO04 W2 - PWM5
GPIO_LED2_INV, // GPIO05 Red LED
0, 0, 0, 0, 0, 0, // Flash connection
@ -1019,4 +1019,4 @@ const mytmplt kModules[MAXMODULE] PROGMEM = {
}
*/
#endif // _SONOFF_TEMPLATE_H_
#endif // _SONOFF_TEMPLATE_H_