Skip to content

Commit a753874

Browse files
authored
Removed clumsy polling implementation
1 parent 383ba40 commit a753874

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

cores/arduino/HardwareSerial.h

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@
1919
Modified 28 September 2010 by Mark Sproul
2020
Modified 14 August 2012 by Alarus
2121
Modified 3 December 2013 by Matthijs Kooijman
22-
Modified 1 may 2023 by TempersLee
23-
Modified 13 October 2023 by Maxint R&D
22+
Modified 1 May 2023 by TempersLee
23+
Modified 28 July 2024 by Maxint R&D
2424
*/
2525

2626
#ifndef HardwareSerial_h
2727
#define HardwareSerial_h
2828

29-
// MMOLE 240619: set OPT_USART1_INT to 1 if you want to use interrupts for receiving serial data instead of a clumsy polling implementation.
29+
// MMOLE 240619: set OPT_USART1_INT to 1 if you want to use interrupts for receiving serial data.
3030
#define OPT_USART1_INT 1
3131

32-
3332
#if 1
3433

3534
#include <inttypes.h>
@@ -178,12 +177,6 @@ class HardwareSerial : public Stream {
178177
uint8_t _config;
179178
unsigned long _baud;
180179
void init(PinName _rx, PinName _tx, PinName _rts = NC, PinName _cts = NC);
181-
182-
// MMOLE: reintroduced RX buffer to properly implement read/available/peek methods
183-
#if(OPT_USART1_INT==1)
184-
#else
185-
void fillRxBuffer(void); // read all characters that can be read
186-
#endif
187180
};
188181

189182
#if defined(USART1)
@@ -201,7 +194,7 @@ class HardwareSerial : public Stream {
201194
#if defined(UART5) || defined(USART5)
202195
extern HardwareSerial Serial5;
203196
#endif
204-
#if defined(USART6)
197+
#if defined(USART6) || defined(USART6)
205198
extern HardwareSerial Serial6;
206199
#endif
207200
#if defined(UART7) || defined(USART7)

0 commit comments

Comments
 (0)