File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 27
27
#include " api/deprecated-avr-comp/avr/dtostrf.h"
28
28
29
29
#ifdef __cplusplus
30
+ using namespace arduino ;
30
31
extern " C" {
31
32
#endif
32
33
Original file line number Diff line number Diff line change 28
28
29
29
// Constructors ////////////////////////////////////////////////////////////////
30
30
31
- Uart::Uart (XMC_UART_t *xmc_uart_config,
32
- arduino::RingBuffer *rx_buffer,
33
- arduino::RingBuffer *tx_buffer) {
31
+ Uart::Uart (XMC_UART_t *xmc_uart_config, RingBuffer *rx_buffer, RingBuffer *tx_buffer) {
34
32
_XMC_UART_config = xmc_uart_config;
35
33
_rx_buffer = rx_buffer;
36
34
_tx_buffer = tx_buffer;
Original file line number Diff line number Diff line change @@ -87,13 +87,10 @@ typedef enum XMC_UART_MODE {
87
87
// ****************************************************************************
88
88
// @Class Definitionsw
89
89
// ****************************************************************************
90
- class Uart : public arduino :: HardwareSerial {
90
+ class Uart : public HardwareSerial {
91
91
public:
92
92
XMC_UART_t *_XMC_UART_config;
93
-
94
- Uart (XMC_UART_t *xmc_uart_config,
95
- arduino::RingBuffer *rx_buffer,
96
- arduino::RingBuffer *tx_buffer);
93
+ q Uart (XMC_UART_t *xmc_uart_config, RingBuffer *rx_buffer, RingBuffer *tx_buffer);
97
94
98
95
void begin (unsigned long );
99
96
void begin (unsigned long baudrate, uint16_t config) override ;
@@ -129,7 +126,7 @@ class Uart : public arduino::HardwareSerial {
129
126
void IrqHandler (void );
130
127
131
128
private:
132
- arduino:: RingBuffer *_rx_buffer;
129
+ RingBuffer *_rx_buffer;
133
130
arduino::RingBuffer *_tx_buffer;
134
131
};
135
132
Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ int main(void) {
49
49
setup ();
50
50
while (1 ) {
51
51
loop ();
52
- serialEventRun ();
52
+ if (arduino::serialEventRun) {
53
+ arduino::serialEventRun ();
54
+ } else {
55
+ ::serialEventRun ();
56
+ }
53
57
}
54
58
}
55
59
You can’t perform that action at this time.
0 commit comments