Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 712cf1d

Browse files
leg0ahtilego
authored andcommitted
Fix compile errors
1 parent 06df3bb commit 712cf1d

File tree

4 files changed

+9
-20
lines changed

4 files changed

+9
-20
lines changed

‎cores/arduino/UART.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ typedef uint8_t rx_buffer_index_t;
113113
#define SERIAL_7O2 0x3C
114114
#define SERIAL_8O2 0x3E
115115

116-
class UartClass : public HardwareSerial
116+
class UartClass : public arduino::HardwareSerial
117117
{
118118
protected:
119119
volatile uint8_t * const _ubrrh;

‎cores/arduino/main.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int main(void)
4444

4545
for (;;) {
4646
loop();
47-
if (serialEventRun) serialEventRun();
47+
if (arduino::serialEventRun) arduino::serialEventRun();
4848
}
4949

5050
return 0;

‎libraries/Wire/src/Wire.cpp‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,25 +119,15 @@ uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint32_t iaddres
119119
return read;
120120
}
121121

122-
uint8_t TwoWire::requestFrom(uint8_t address, size_t quantity, bool sendStop) {
122+
size_t TwoWire::requestFrom(uint8_t address, size_t quantity, bool sendStop) {
123123
return requestFrom((uint8_t)address, (uint8_t)quantity, (uint32_t)0, (uint8_t)0, (uint8_t)sendStop);
124124
}
125125

126-
uint8_t TwoWire::requestFrom(uint8_t address, size_t quantity)
126+
size_t TwoWire::requestFrom(uint8_t address, size_t quantity)
127127
{
128128
return requestFrom(address, quantity, true);
129129
}
130130

131-
uint8_t TwoWire::requestFrom(int address, int quantity)
132-
{
133-
return requestFrom((uint8_t)address, (size_t)quantity, true);
134-
}
135-
136-
uint8_t TwoWire::requestFrom(int address, int quantity, int sendStop)
137-
{
138-
return requestFrom((uint8_t)address, (size_t)quantity, (bool)sendStop);
139-
}
140-
141131
void TwoWire::beginTransmission(uint8_t address)
142132
{
143133
// indicate that we are transmitting

‎libraries/Wire/src/Wire.h‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@
2323
#define TwoWire_h
2424

2525
#include <Arduino.h>
26+
#include <api/HardwareI2C.h>
2627

2728
#define BUFFER_LENGTH 32
2829

2930
// WIRE_HAS_END means Wire has end()
3031
#define WIRE_HAS_END 1
3132

32-
class TwoWire : public HardwareI2C
33+
class TwoWire : public arduino::HardwareI2C
3334
{
3435
private:
3536
static uint8_t rxBuffer[];
@@ -57,11 +58,9 @@ class TwoWire : public HardwareI2C
5758
void beginTransmission(int);
5859
uint8_t endTransmission(void);
5960
uint8_t endTransmission(bool);
60-
uint8_t requestFrom(uint8_t, size_t);
61-
uint8_t requestFrom(uint8_t, size_t, bool);
61+
size_t requestFrom(uint8_t, size_t);
62+
size_t requestFrom(uint8_t, size_t, bool);
6263
uint8_t requestFrom(uint8_t, uint8_t, uint32_t, uint8_t, uint8_t);
63-
uint8_t requestFrom(int, int);
64-
uint8_t requestFrom(int, int, int);
6564
virtual size_t write(uint8_t);
6665
virtual size_t write(const uint8_t *, size_t);
6766
virtual int available(void);
@@ -75,7 +74,7 @@ class TwoWire : public HardwareI2C
7574
inline size_t write(long n) { return write((uint8_t)n); }
7675
inline size_t write(unsigned int n) { return write((uint8_t)n); }
7776
inline size_t write(int n) { return write((uint8_t)n); }
78-
using Print::write;
77+
using arduino::Print::write;
7978
};
8079

8180
extern TwoWire Wire;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /