Skip to content

Commit 0ad3e04

Browse files
committed
Compile error ESP8266
1 parent 2a44c1e commit 0ad3e04

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

src/Driver/DriverConstants.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
2-
2+
#ifdef ARDUINO
3+
# include "Arduino.h" // for delay
4+
#endif
35

46
typedef enum {
57
_DAC_OUTPUT_MIN = -1,
@@ -122,4 +124,3 @@ typedef struct {
122124

123125

124126

125-
void delay(uint32_t);

src/Driver/es8156/es8156.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
#include <math.h>
2727
#include "es8156.h"
2828

29+
#ifndef BIT
2930
#define BIT(nr) (1 << (nr))
31+
#endif
3032
// 0x8 = 0x10>>1
3133
#define ES8156_ADDR 0x8
3234
#define BOARD_PA_GAIN (0) /* Power amplifier gain defined by board (dB) */

src/Driver/es8311/es8311.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
#include "es8311.h"
2727

2828

29+
#ifndef BIT
2930
#define BIT(nr) (1 << (nr))
31+
#endif
3032

3133
/* ES8311 address
3234
* 0x32:CE=1;0x30:CE=0

src/DriverPins.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@ struct PinsI2C {
197197
}
198198
return true;
199199
}
200-
void end() { p_wire->end(); }
200+
void end() {
201+
#ifndef ESP8266
202+
p_wire->end();
203+
#endif
204+
}
201205
};
202206

203207
/**

src/Utils/etc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void logStr(const char* msg);
2828
#ifndef ARDUINO
2929
void pinMode(int, int);
3030
void digitalWrite(int, int);
31-
void delay(uint32_t);
31+
void delay(unsigned long);
3232
#endif
3333

3434

0 commit comments

Comments
 (0)