Skip to content

Commit c79e543

Browse files
Move to Arduino API 10501 (#2797)
* Move to Arduino API 10501 Track upstream Arduino API headers * IPAddress V4/V6 compatiblity restored * Fix WiFiUDP includes * String differences in example * HardwareSerial using exported
1 parent 3c556e6 commit c79e543

File tree

10 files changed

+16
-10
lines changed

10 files changed

+16
-10
lines changed

ArduinoCore-API

Submodule ArduinoCore-API updated 138 files

cores/rp2040/Arduino.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ extern bool __isFreeRTOS;
110110
#endif
111111

112112
#ifndef PGM_VOID_P
113-
#define PGM_VOID_P void *
113+
#define PGM_VOID_P const void *
114114
#endif
115115

116116
#ifdef __cplusplus
@@ -159,3 +159,7 @@ constexpr uint64_t __bitset(const int (&a)[N], size_t i = 0U) {
159159
#define __GPIOCNT 30
160160
#define __FIRSTANALOGGPIO 26
161161
#endif
162+
163+
#ifdef __cplusplus
164+
using namespace arduino;
165+
#endif

cores/rp2040/SerialPIO.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
extern "C" typedef struct uart_inst uart_inst_t;
3131

32-
class SerialPIO : public HardwareSerial {
32+
class SerialPIO : public arduino::HardwareSerial {
3333
public:
3434
static const pin_size_t NOPIN = 0xff; // Use in constructor to disable RX or TX unit
3535
SerialPIO(pin_size_t tx, pin_size_t rx, size_t fifoSize = 32);

cores/rp2040/SerialSemi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "Arduino.h"
2525
#include "api/HardwareSerial.h"
2626

27-
class SerialSemiClass : public HardwareSerial {
27+
class SerialSemiClass : public arduino::HardwareSerial {
2828
public:
2929
SerialSemiClass() {
3030
/* noop */

cores/rp2040/SerialUART.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
extern "C" typedef struct uart_inst uart_inst_t;
3030

3131
#define UART_PIN_NOT_DEFINED (255u)
32-
class SerialUART : public HardwareSerial {
32+
class SerialUART : public arduino::HardwareSerial {
3333
public:
3434
SerialUART(uart_inst_t *uart, pin_size_t tx, pin_size_t rx, pin_size_t rts = UART_PIN_NOT_DEFINED, pin_size_t cts = UART_PIN_NOT_DEFINED);
3535

cores/rp2040/SerialUSB.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "api/HardwareSerial.h"
2525
#include <stdarg.h>
2626

27-
class SerialUSB : public HardwareSerial {
27+
class SerialUSB : public arduino::HardwareSerial {
2828
public:
2929
SerialUSB() { }
3030
void begin(unsigned long baud = 115200) override;

cores/rp2040/posix.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <errno.h>
2424
#include <_syslist.h>
2525
#include <sys/times.h>
26+
#include <sys/unistd.h>
2627
#include <pico/stdlib.h>
2728
#include <pico/multicore.h>
2829

cores/rp2040/wiring_shift.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ extern "C" void shiftOut(pin_size_t dataPin, pin_size_t clockPin, BitOrder bitOr
5656
}
5757
for (i = 0; i < 8; i++) {
5858
if (bitOrder == LSBFIRST) {
59-
digitalWrite(dataPin, !!(val & (1 << i)));
59+
digitalWrite(dataPin, !!(val & (1 << i)) ? HIGH : LOW);
6060
} else {
61-
digitalWrite(dataPin, !!(val & (1 << (7 - i))));
61+
digitalWrite(dataPin, !!(val & (1 << (7 - i))) ? HIGH : LOW);
6262
}
6363

6464
digitalWrite(clockPin, HIGH);

libraries/WebServer/examples/FSBrowser/FSBrowser.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ void handleFileList() {
216216
// as an HTTP chunk
217217
Serial.println(output);
218218
server.sendContent(output);
219-
output = ',';
219+
output = ",";
220220
} else {
221-
output = '[';
221+
output = "[";
222222
}
223223

224224
output += "{\"type\":\"";

libraries/WiFi/src/WiFiUdp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#pragma once
2323

24+
#include <Arduino.h>
2425
#include <Udp.h>
2526
#include <include/slist.h>
2627

0 commit comments

Comments
 (0)