Skip to content

Commit b1b0438

Browse files
committed
In loopback example, explicit pin settings and for ESP32, realistic max. bps for single stop bit config.
1 parent 6b8c801 commit b1b0438

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/loopback/loopback.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@
3131
#define HALFDUPLEX 1
3232

3333
#ifdef ESP32
34-
constexpr int IUTBITRATE = 64000;
34+
constexpr int IUTBITRATE = 57600;
3535
#else
3636
constexpr int IUTBITRATE = 153600;
3737
#endif
3838

3939
#if defined(ESP8266)
40-
constexpr SoftwareSerialConfig swSerialConfig = SWSERIAL_8E2;
41-
constexpr SerialConfig hwSerialConfig = SERIAL_8E2;
40+
constexpr SoftwareSerialConfig swSerialConfig = SWSERIAL_8E1;
41+
constexpr SerialConfig hwSerialConfig = SERIAL_8E1;
4242
#elif defined(ESP32)
43-
constexpr SoftwareSerialConfig swSerialConfig = SWSERIAL_8E2;
44-
constexpr uint32_t hwSerialConfig = SERIAL_8E2;
43+
constexpr SoftwareSerialConfig swSerialConfig = SWSERIAL_8E1;
44+
constexpr uint32_t hwSerialConfig = SERIAL_8E1;
4545
#else
4646
constexpr unsigned swSerialConfig = 3;
4747
#endif
@@ -97,7 +97,7 @@ void setup() {
9797
#endif
9898
#elif defined(ESP32)
9999
#if defined(HWLOOPBACK) || defined(HWSOURCESWSINK)
100-
Serial2.begin(IUTBITRATE, hwSerialConfig);
100+
Serial2.begin(IUTBITRATE, hwSerialConfig, D4, D3, false);
101101
Serial2.setRxBufferSize(2 * BLOCKSIZE);
102102
logger.begin(9600);
103103
#elif defined(HWSOURCESINK)

0 commit comments

Comments
 (0)