Skip to content

Commit a344895

Browse files
authored
Merge pull request #72 from bxparks/develop
merge 1.4.0 into master
2 parents 3ec3cd3 + beb0def commit a344895

File tree

8 files changed

+141
-297
lines changed

8 files changed

+141
-297
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22

33
* Unreleased
4+
* 1.4.0 (2022-11-06)
5+
* Add `memcmp_P()` by @dawidchyrzynski in
6+
[PR#71](https://github.com/bxparks/EpoxyDuino/pull/71).
7+
* Add `Udp.h` interface supporting both the AVR and ESP8266 variants.
8+
* Provide actual stub implementations of `configTime()` for ESP8266.
49
* 1.3.1 (2022-08-13)
510
* Add `tone()` and `noTone()` stubs. By @kwisii in
611
[PR#69](https://github.com/bxparks/EpoxyDuino/pull/69).

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The disadvantages are:
7171
environments (e.g. 16-bit `int` versus 32-bit `int`, or 32-bit `long` versus
7272
64-bit `long`).
7373

74-
**Version**: 1.3.1 (2022-08-13)
74+
**Version**: 1.4.0 (2022-11-06)
7575

7676
**Changelog**: See [CHANGELOG.md](CHANGELOG.md)
7777

@@ -98,7 +98,6 @@ The disadvantages are:
9898
* [Command Line Flags and Arguments](#CommandLineFlagsAndArguments)
9999
* [Debugging](#Debugging)
100100
* [Valgrind](#Valgrind)
101-
* [Controlling digitalRead()](#DigitalReadValue)
102101
* [Mock digitalRead() digitalWrite()](#MockDigitalReadDigitalWrite)
103102
* [digitalReadValue()](#DigitalReadValue)
104103
* [digitalWriteValue()](#DigitalWriteValue)
@@ -380,7 +379,7 @@ all:
380379
set -e; \
381380
for i in */Makefile; do \
382381
echo '==== Making:' $$(dirname $$i); \
383-
$(MAKE) -C $$(dirname $$i) -j; \
382+
$(MAKE) -C $$(dirname $$i); \
384383
done
385384

386385
clean:
@@ -398,7 +397,7 @@ tests:
398397
set -e; \
399398
for i in *Test/Makefile; do \
400399
echo '==== Making:' $$(dirname $$i); \
401-
$(MAKE) -C $$(dirname $$i) -j; \
400+
$(MAKE) -C $$(dirname $$i); \
402401
done
403402

404403
runtests:
@@ -588,7 +587,7 @@ be defined through the `-D` flag through `-D $(EPOXY_CORE)`.
588587
There are currently 2 valid options for this Makefile variable:
589588

590589
* `EPOXY_CORE_AVR` (default)
591-
* Causes `Arduino.h` to emulate the Arduino AVR core.
590+
* Causes `Arduino.h` to emulate the Arduino AVR Core.
592591
* `EPOXY_CORE_ESP8266`
593592
* Causes `Arduino.h` to emulate the ESP8266 Core.
594593

@@ -607,6 +606,18 @@ compiler, which will activate any code that is guarded by:
607606
#endif
608607
```
609608

609+
Note that:
610+
611+
* `EPOXY_CORE_AVR` does **not** define the `ARDUINO_ARCH_AVR` macro,
612+
* `EPOXY_CORE_ESP8266` does **not** define the `ESP8266` or the
613+
`ARDUINO_ARCH_ESP8266` macros.
614+
615+
This is because EpoxyDuino cannot provide perfect emulation of all the classes
616+
and APIs of the AVR, the ESP8266, or any other third party cores. So defining
617+
these macros would break too much code. The developer must carefully evaluate
618+
whether a `#if defined(EXPOXY_CORE_ESP8266)` should be enabled for code that is
619+
guarded by `#if defined(ESP8266)`.
620+
610621
#### `EPOXY_CORE_PATH`
611622

612623
If the `EPOXY_CORE` make variable is insufficient (e.g. because the appropriate
@@ -828,7 +839,7 @@ which are implemented:
828839
* `bit()`, `bitRead()`, `bitSet()`, `bitClear()`, `bitWrite()`
829840
* `random()`, `randomSeed()`, `map()`
830841
* `makeWord()`
831-
* `F_CPU`, `clockCyclesPerMicrosecond(), `clockCyclesToMicroseconds()`,
842+
* `F_CPU`, `clockCyclesPerMicrosecond()`, `clockCyclesToMicroseconds()`,
832843
`microsecondsToClockCycles()`
833844
* `HIGH`, `LOW`, `INPUT`, `OUTPUT`, `INPUT_PULLUP`
834845
* I2C and SPI pins: `SS`, `MOSI`, `MISO`, `SCK`, `SDA`, `SCL`
@@ -849,7 +860,7 @@ which are implemented:
849860
`pgm_read_float()`, `pgm_read_ptr()`
850861
* `strlen_P()`, `strcat_P()`, `strcpy_P()`, `strncpy_P()`, `strcmp_P()`,
851862
`strncmp_P()`, `strcasecmp_P()`, `strchr_P()`, `strrchr_P()`, `strstr_P()`
852-
* `memcpy_P()`, `vsnprintf_P()`
863+
* `memcpy_P()`, `memcmp_P()`, `vsnprintf_P()`
853864
* `PROGMEM`, `PGM_P`, `PGM_VOID_P`, `PSTR()`
854865
* `IPAddress.h`
855866
* `IPAddress` class
@@ -1274,3 +1285,5 @@ people ask similar questions later.
12741285
[PR#69](https://github.com/bxparks/EpoxyDuino/pull/69).
12751286
* Add `uint8_t digitalWriteValue(pin)` by @kwisii in
12761287
[PR#68](https://github.com/bxparks/EpoxyDuino/pull/68).
1288+
* Add `memcmp_P()` by @dawidchyrzynski in
1289+
[PR#71](https://github.com/bxparks/EpoxyDuino/pull/71).

cores/epoxy/Arduino.h

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#define EPOXY_DUINO_EPOXY_ARDUINO_H
1515

1616
// xx.yy.zz => xxyyzz (without leading 0)
17-
#define EPOXY_DUINO_VERSION 10301
18-
#define EPOXY_DUINO_VERSION_STRING "1.3.1"
17+
#define EPOXY_DUINO_VERSION 10400
18+
#define EPOXY_DUINO_VERSION_STRING "1.4.0"
1919

2020
#include <algorithm> // min(), max()
2121
#include <cmath> // abs()
@@ -306,13 +306,20 @@ uint16_t makeWord(byte h, byte l);
306306
#endif
307307

308308
#if defined(EPOXY_CORE_ESP8266)
309-
void setTZ(const char* tz);
310-
311-
void configTime(int timezone, int daylightOffset_sec, const char* server1,
312-
const char* server2 = nullptr, const char* server3 = nullptr);
313-
314-
void configTime(const char* tz, const char* server1,
315-
const char* server2 = nullptr, const char* server3 = nullptr);
309+
inline void setTZ(const char* /*tz*/) {}
310+
311+
inline void configTime(
312+
int /*timezone*/,
313+
int /*daylightOffset_sec*/,
314+
const char* /*server1*/,
315+
const char* /*server2*/ = nullptr,
316+
const char* /*server3*/ = nullptr) {}
317+
318+
inline void configTime(
319+
const char* /*tz*/,
320+
const char* /*server1*/,
321+
const char* /*server2*/ = nullptr,
322+
const char* /*server3*/ = nullptr) {}
316323

317324
// esp32 api compatibility
318325
inline void configTzTime(const char* tz, const char* server1,

0 commit comments

Comments
 (0)