File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 14
14
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
15
15
HardwareSerial Serial (UART0);
16
16
HardwareSerial Serial1 (UART1);
17
+ #ifndef PLATFORM_SIM868
17
18
HardwareSerial Serial2 (UART2);
18
- #if defined(SOC_RDA8910) || defined(PLATFORM_S20U) || defined(PLATFORM_M56)
19
+ #endif
20
+ #if defined(SOC_RDA8910) || defined(PLATFORM_MC20U) || defined(PLATFORM_SIM868) || defined(PLATFORM_M56)
19
21
HardwareSerial USBSerial (USBUART);
20
22
#endif
21
23
HardwareSerial BTSerial (BTSPPHOST);
22
24
#endif
23
25
24
26
void serialEvent () __attribute__((weak));
25
27
void serialEvent1 () __attribute__((weak));
28
+ #ifndef PLATFORM_SIM868
26
29
void serialEvent2 () __attribute__((weak));
27
- #if defined(SOC_RDA8910) || defined(PLATFORM_S20U) || defined(PLATFORM_M56)
30
+ #endif
31
+ #if defined(SOC_RDA8910) || defined(PLATFORM_MC20U) || defined(PLATFORM_SIM868) || defined(PLATFORM_M56)
28
32
void usbSerialEvent () __attribute__((weak));
29
33
#endif
30
34
void btSerialEvent () __attribute__((weak));
@@ -37,10 +41,12 @@ void serialEventRun(void)
37
41
if (serialEvent1 && Serial1.available ())
38
42
serialEvent1 ();
39
43
44
+ #ifndef PLATFORM_SIM868
40
45
if (serialEvent2 && Serial2.available ())
41
46
serialEvent2 ();
47
+ #endif
42
48
43
- #if defined(SOC_RDA8910) || defined(PLATFORM_S20U ) || defined(PLATFORM_M56)
49
+ #if defined(SOC_RDA8910) || defined(PLATFORM_MC20U) || defined(PLATFORM_SIM868 ) || defined(PLATFORM_M56)
44
50
if (usbSerialEvent && USBSerial.available ())
45
51
usbSerialEvent ();
46
52
#endif
Original file line number Diff line number Diff line change 24
24
25
25
#define UART0 " /dev/ttyS0"
26
26
#define UART1 " /dev/ttyS1"
27
+ #ifndef PLATFORM_SIM868
27
28
#define UART2 " /dev/ttyS2"
29
+ #endif
28
30
#define USBUART " /dev/ttyUSB0"
29
31
#define BTSPPHOST " /dev/bthost0"
30
32
@@ -91,7 +93,9 @@ class HardwareSerial: public Stream {
91
93
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
92
94
extern HardwareSerial Serial;
93
95
extern HardwareSerial Serial1;
96
+ #ifndef PLATFORM_SIM868
94
97
extern HardwareSerial Serial2;
98
+ #endif
95
99
extern HardwareSerial USBSerial;
96
100
extern HardwareSerial BTSerial;
97
101
#endif
You can’t perform that action at this time.
0 commit comments