File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828
2929#ifdef __cplusplus
3030using namespace arduino ;
31-
3231extern " C" {
3332#endif
3433
Original file line number Diff line number Diff line change 2828
2929// Constructors ////////////////////////////////////////////////////////////////
3030
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) {
3432 _XMC_UART_config = xmc_uart_config;
3533 _rx_buffer = rx_buffer;
3634 _tx_buffer = tx_buffer;
Original file line number Diff line number Diff line change @@ -87,13 +87,10 @@ typedef enum XMC_UART_MODE {
8787// ****************************************************************************
8888// @Class Definitionsw
8989// ****************************************************************************
90- class Uart : public arduino :: HardwareSerial {
90+ class Uart : public HardwareSerial {
9191public:
9292 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);
9794
9895 void begin (unsigned long );
9996 void begin (unsigned long baudrate, uint16_t config) override ;
@@ -129,7 +126,7 @@ class Uart : public arduino::HardwareSerial {
129126 void IrqHandler (void );
130127
131128private:
132- arduino:: RingBuffer *_rx_buffer;
129+ RingBuffer *_rx_buffer;
133130 arduino::RingBuffer *_tx_buffer;
134131};
135132
Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ int main(void) {
4949 setup ();
5050 while (1 ) {
5151 loop ();
52- serialEventRun ();
52+ if (arduino::serialEventRun) {
53+ arduino::serialEventRun ();
54+ } else {
55+ ::serialEventRun ();
56+ }
5357 }
5458}
5559
You can’t perform that action at this time.
0 commit comments