26
26
void serialEvent (void ) __attribute__((weak));
27
27
void serialEvent (void ) {}
28
28
29
- #if SOC_UART_NUM > 1
29
+ #if SOC_UART_HP_NUM > 1
30
30
void serialEvent1 (void ) __attribute__((weak));
31
31
void serialEvent1 (void ) {}
32
- #endif /* SOC_UART_NUM > 1 */
32
+ #endif /* SOC_UART_HP_NUM > 1 */
33
33
34
- #if SOC_UART_NUM > 2
34
+ #if SOC_UART_HP_NUM > 2
35
35
void serialEvent2 (void ) __attribute__((weak));
36
36
void serialEvent2 (void ) {}
37
- #endif /* SOC_UART_NUM > 2 */
37
+ #endif /* SOC_UART_HP_NUM > 2 */
38
38
39
39
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
40
40
// There is always Seria0 for UART0
41
41
HardwareSerial Serial0 (0 );
42
- #if SOC_UART_NUM > 1
42
+ #if SOC_UART_HP_NUM > 1
43
43
HardwareSerial Serial1 (1 );
44
44
#endif
45
- #if SOC_UART_NUM > 2
45
+ #if SOC_UART_HP_NUM > 2
46
46
HardwareSerial Serial2 (2 );
47
47
#endif
48
48
@@ -72,12 +72,12 @@ void serialEventRun(void) {
72
72
if (Serial0.available ()) {
73
73
serialEvent ();
74
74
}
75
- #if SOC_UART_NUM > 1
75
+ #if SOC_UART_HP_NUM > 1
76
76
if (Serial1.available ()) {
77
77
serialEvent1 ();
78
78
}
79
79
#endif
80
- #if SOC_UART_NUM > 2
80
+ #if SOC_UART_HP_NUM > 2
81
81
if (Serial2.available ()) {
82
82
serialEvent2 ();
83
83
}
@@ -279,8 +279,8 @@ void HardwareSerial::_uartEventTask(void *args) {
279
279
}
280
280
281
281
void HardwareSerial::begin (unsigned long baud, uint32_t config, int8_t rxPin, int8_t txPin, bool invert, unsigned long timeout_ms, uint8_t rxfifo_full_thrhd) {
282
- if (_uart_nr >= SOC_UART_NUM ) {
283
- log_e (" Serial number is invalid, please use a number from 0 to %u" , SOC_UART_NUM - 1 );
282
+ if (_uart_nr >= SOC_UART_HP_NUM ) {
283
+ log_e (" Serial number is invalid, please use a number from 0 to %u" , SOC_UART_HP_NUM - 1 );
284
284
return ;
285
285
}
286
286
@@ -305,7 +305,7 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
305
305
txPin = _txPin < 0 ? (int8_t )SOC_TX0 : _txPin;
306
306
}
307
307
break ;
308
- #if SOC_UART_NUM > 1 // may save some flash bytes...
308
+ #if SOC_UART_HP_NUM > 1 // may save some flash bytes...
309
309
case UART_NUM_1:
310
310
if (rxPin < 0 && txPin < 0 ) {
311
311
// do not change RX1/TX1 if it has already been set before
@@ -314,7 +314,7 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
314
314
}
315
315
break ;
316
316
#endif
317
- #if SOC_UART_NUM > 2 // may save some flash bytes...
317
+ #if SOC_UART_HP_NUM > 2 // may save some flash bytes...
318
318
case UART_NUM_2:
319
319
if (rxPin < 0 && txPin < 0 ) {
320
320
// do not change RX2/TX2 if it has already been set before
0 commit comments