[realtek-ambz] Export SoftwareSerial availability macro
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "SoftwareSerial.h"
|
||||
|
||||
#ifdef LT_ARD_HAS_SOFTSERIAL
|
||||
|
||||
SoftwareSerial::SoftwareSerial(pin_size_t receivePin, pin_size_t transmitPin, bool inverted) {
|
||||
data.rx.buf = NULL;
|
||||
data.tx.buf = NULL;
|
||||
@@ -39,3 +41,5 @@ size_t SoftwareSerial::write(uint8_t c) {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef LT_ARD_HAS_SOFTSERIAL
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <api/HardwareSerial.h>
|
||||
#include <api/RingBuffer.h>
|
||||
@@ -71,4 +73,4 @@ class SoftwareSerial : public HardwareSerial {
|
||||
using Print::write;
|
||||
};
|
||||
|
||||
#define HAS_SERIAL_CLASS 1
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,7 @@ env.Append(
|
||||
# LibreTuya configuration
|
||||
("LT_ARD_HAS_WIFI", "1"),
|
||||
("LT_ARD_HAS_MD5", "1"),
|
||||
("LT_ARD_HAS_SOFTSERIAL", "1"),
|
||||
# not broken anymore with printf() library
|
||||
("LT_PRINTF_BROKEN", "0"),
|
||||
],
|
||||
|
||||
@@ -112,4 +112,5 @@ The meaning of most flags is as follows:
|
||||
- `LT_HAS_MBEDTLS` - mbedTLS in SDK
|
||||
- `LT_ARD_HAS_MD5` - MD5 library implemented, `MD5Impl.h` available
|
||||
- `LT_ARD_HAS_WIFI` - WiFi library implemented, `WiFiData.h` available
|
||||
- `LT_ARD_HAS_SOFTSERIAL` - SoftwareSerial library implemented, `SoftwareSerial.h` available
|
||||
- `LT_HEAP_FUNC` - function name used to get available heap size (for `LT_HEAP_I()`)
|
||||
|
||||
Reference in New Issue
Block a user