dev_beta_softSerial #4
No files matched your search
@@ -5,7 +5,7 @@
|
||||
#include "HardwareSerial.h"
|
||||
#include <uart_lib.h>
|
||||
#include "mik32_hal_irq.h"
|
||||
|
||||
#include "wiring_LL.h"
|
||||
|
||||
// HardwareSerial class objects for use in Arduino IDE
|
||||
HardwareSerial Serial(0);
|
||||
@@ -127,9 +127,9 @@ void HardwareSerial::rx_complete_irq(void)
|
||||
unsigned char c;
|
||||
// while there is something to receive, put the data into the buffer
|
||||
// and edit the buffer index
|
||||
while (!UART_IsRxFifoEmpty(uart))
|
||||
while(!UART_IS_RX_FIFO_EMPTY(uart))
|
||||
{
|
||||
c = UART_ReadByte(uart);
|
||||
c = UART_READ_BYTE(uart);
|
||||
if (i != _rx_buffer_tail)
|
||||
{
|
||||
// write if there is space in the buffer
|
||||
|
||||
@@ -100,7 +100,7 @@ class HardwareSerial : public Stream
|
||||
using Print::write; // pull in write(str)
|
||||
operator bool() { return isInited; }
|
||||
|
||||
void rx_complete_irq(void) __attribute__((optimize("O3")));
|
||||
inline void rx_complete_irq(void) __attribute__((always_inline, optimize("O3")));
|
||||
};
|
||||
|
||||
extern HardwareSerial Serial;
|
||||
|
||||
Reference in new issue
Block a user