diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-09-26 20:36:05 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-09-26 20:36:05 +1000 |
| commit | abc626c1daae0112ea84addcc8b048dd8d0e2979 (patch) | |
| tree | 8a4009d1f366407145e823df92e4bb40124e6eeb /src | |
| parent | 8608f9367fc29e498f42f5249aa248dd2044d567 (diff) | |
| download | tangara-fw-abc626c1daae0112ea84addcc8b048dd8d0e2979.tar.gz | |
Place a2dp stream callback into IRAM
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/bluetooth.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/bluetooth.cpp b/src/drivers/bluetooth.cpp index 1d9d57df..ca9f1a9c 100644 --- a/src/drivers/bluetooth.cpp +++ b/src/drivers/bluetooth.cpp @@ -11,6 +11,7 @@ #include "bluetooth_types.hpp" #include "esp_a2dp_api.h" +#include "esp_attr.h" #include "esp_avrc_api.h" #include "esp_bt.h" #include "esp_bt_defs.h" @@ -30,7 +31,7 @@ namespace drivers { static constexpr char kTag[] = "bluetooth"; -static StreamBufferHandle_t sStream = nullptr; +DRAM_ATTR static StreamBufferHandle_t sStream = nullptr; auto gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t* param) -> void { tinyfsm::FsmList<bluetooth::BluetoothState>::dispatch( @@ -48,7 +49,7 @@ auto a2dp_cb(esp_a2d_cb_event_t event, esp_a2d_cb_param_t* param) -> void { bluetooth::events::internal::A2dp{.type = event, .param = param}); } -auto a2dp_data_cb(uint8_t* buf, int32_t buf_size) -> int32_t { +IRAM_ATTR auto a2dp_data_cb(uint8_t* buf, int32_t buf_size) -> int32_t { if (buf == nullptr || buf_size <= 0) { return 0; } |
