Skip to content

Commit 9d81be6

Browse files
facchinmgiulcioffi
authored andcommitted
Port to namespaced ArduinoAPI
1 parent 29f7f37 commit 9d81be6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

cores/arduino/USB/USBAPI.h

+5
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,15 @@
2929

3030
#if defined __cplusplus
3131

32+
#include "Arduino.h"
3233
#include "api/Stream.h"
3334
#include "api/RingBuffer.h"
3435
#include "api/USBAPI.h"
3536

37+
#if ARDUINO_API_VERSION > 10000
38+
using namespace arduino;
39+
#endif
40+
3641
//================================================================================
3742
// USB
3843

cores/arduino/Uart.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#define SERIAL_BUFFER_SIZE 64
2828

29-
class Uart : public HardwareSerial
29+
class Uart : public arduino::HardwareSerial
3030
{
3131
public:
3232
Uart(SERCOM *_s, uint8_t _pinRX, uint8_t _pinTX, SercomRXPad _padRX, SercomUartTXPad _padTX);
@@ -48,8 +48,8 @@ class Uart : public HardwareSerial
4848

4949
private:
5050
SERCOM *sercom;
51-
RingBuffer rxBuffer;
52-
RingBuffer txBuffer;
51+
arduino::RingBuffer rxBuffer;
52+
arduino::RingBuffer txBuffer;
5353

5454
uint8_t uc_pinRX;
5555
uint8_t uc_pinTX;

0 commit comments

Comments
 (0)