Move off of deprecated APIs

custom
jacqueline 8 months ago committed by cooljqln
parent 822c9dc93e
commit 6a2d259f46
  1. 2
      src/drivers/bluetooth.cpp
  2. 4
      src/drivers/i2s_dac.cpp

@ -528,7 +528,7 @@ void Disabled::react(const events::Enable&) {
// Set a reasonable name for the device.
std::pmr::string name = DeviceName();
esp_bt_dev_set_device_name(name.c_str());
esp_bt_gap_set_device_name(name.c_str());
// Initialise GAP. This controls advertising our device, and scanning for
// other devices.

@ -46,12 +46,12 @@ extern "C" IRAM_ATTR auto callback(i2s_chan_handle_t handle,
if (event == nullptr || user_ctx == nullptr) {
return false;
}
if (event->data == nullptr || event->size == 0) {
if (event->dma_buf == nullptr || event->size == 0) {
return false;
}
assert(event->size % 4 == 0);
uint8_t* buf = *reinterpret_cast<uint8_t**>(event->data);
uint8_t* buf = reinterpret_cast<uint8_t*>(event->dma_buf);
auto* src = reinterpret_cast<PcmBuffer*>(user_ctx);
BaseType_t ret =

Loading…
Cancel
Save