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 442bdf7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,18 @@ 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
build-args: --build-property=build.partitions=noota_ffat --build-property=build.psram_type=qspi
arduino-libs: NimBLE-Arduino
- chip: ESP32S2
core-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
core-version: '@2.0.17'
fqbn: esp32:esp32:adafruit_magtag29_esp32s2
build-args: --build-property=build.partitions=default_ffat
build-args: --build-property=build.partitions=noota_ffat --build-property=build.psram_type=qspi
- 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
build-args: --build-property=build.partitions=noota_ffat --build-property=build.psram_type=qspi
arduino-libs: NimBLE-Arduino
- chip: nRF52
fqbn: adafruit:nrf52:feather52832
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 442bdf7

Please sign in to comment.