Skip to content

Commit

Permalink
port: support ESP32 v3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
yoursunny committed Jun 6, 2024
1 parent f9485ba commit 29b8d24
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
fqbn: esp8266:esp8266:nodemcuv2
- chip: ESP32
core-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
core-version: '@2.0.17'
fqbn: esp32:esp32:esp32wrover
build-args: --build-property=build.partitions=default_ffat
arduino-libs: NimBLE-Arduino
Expand All @@ -26,7 +25,6 @@ jobs:
build-args: --build-property=build.partitions=default_ffat
- chip: ESP32C3
core-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
core-version: '@2.0.17'
fqbn: esp32:esp32:esp32c3
build-args: --build-property=build.partitions=default_ffat
arduino-libs: NimBLE-Arduino
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

**esp8266ndn** library enables [Named Data Networking](https://named-data.net/) application development in Arduino environment. It supports [ESP8266](https://github.com/esp8266/Arduino), [ESP32, ESP32-S2, ESP32-C3](https://github.com/espressif/arduino-esp32), and [Adafruit nRF52](https://github.com/adafruit/Adafruit_nRF52_Arduino) microcontrollers.

Note: currently NDNph and esp8266ndn are compatible with ESP32 Arduino core v2.x; it is incompatible with ESP32 Arduino core v3.x at the moment.

* [Doxygen documentation](https://esp8266ndn.ndn.today/)
* [#esp8266ndn on Twitter](https://twitter.com/hashtag/esp8266ndn) for announcements
* [GitHub Issues](https://github.com/yoursunny/esp8266ndn) for bug reports and best-effort support
Expand Down
2 changes: 1 addition & 1 deletion src/port/random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#if defined(ARDUINO_ARCH_ESP8266)
#include <Arduino.h>
#elif defined(ARDUINO_ARCH_ESP32)
#include <esp_system.h>
#include <esp_random.h>
#elif defined(ARDUINO_ARCH_NRF52)
#include <Arduino.h>
#include <algorithm>
Expand Down
6 changes: 3 additions & 3 deletions src/transport/ble-server-transport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class BleServerTransport : public BleServerTransportBase {

/** @brief Retrieve BLE address and address type. */
String getAddr() const {
return String(::BLEDevice::getAddress().toString().data()) + " (addr-type=public)";
return String(::BLEDevice::getAddress().toString().c_str()) + " (addr-type=public)";
}

private:
Expand Down Expand Up @@ -102,8 +102,8 @@ class BleServerTransport : public BleServerTransportBase {
if (chr != m_transport.m_cs) {
return;
}
std::string value = chr->getValue();
m_transport.handleReceive(reinterpret_cast<const uint8_t*>(value.data()), value.size(), 0);
auto value = chr->getValue();
m_transport.handleReceive(reinterpret_cast<const uint8_t*>(value.c_str()), value.length(), 0);
}

private:
Expand Down

0 comments on commit 29b8d24

Please sign in to comment.