Fix BluetoothSerial compilation caused by upstream change (#7681)

Fixes: https://github.com/espressif/arduino-esp32/issues/7675

The signature of `esp_spp_cb_t` has changed in recent ESP-IDF v4.4.3, so this fix targets to accomodate that change in Arduino
This commit is contained in:
Me No Dev 2023-01-12 09:55:43 +02:00 committed by GitHub
parent d342739308
commit d158aa6f5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ static TaskHandle_t _spp_task_handle = NULL;
static EventGroupHandle_t _spp_event_group = NULL;
static EventGroupHandle_t _bt_event_group = NULL;
static boolean secondConnectionAttempt;
static esp_spp_cb_t * custom_spp_callback = NULL;
static esp_spp_cb_t custom_spp_callback = NULL;
static BluetoothSerialDataCb custom_data_callback = NULL;
static esp_bd_addr_t current_bd_addr;
static ConfirmRequestCb confirm_request_callback = NULL;
@ -886,7 +886,7 @@ void BluetoothSerial::confirmReply(boolean confirm)
}
esp_err_t BluetoothSerial::register_callback(esp_spp_cb_t * callback)
esp_err_t BluetoothSerial::register_callback(esp_spp_cb_t callback)
{
custom_spp_callback = callback;
return ESP_OK;

View File

@ -53,7 +53,7 @@ class BluetoothSerial: public Stream
void end(void);
void setTimeout(int timeoutMS);
void onData(BluetoothSerialDataCb cb);
esp_err_t register_callback(esp_spp_cb_t * callback);
esp_err_t register_callback(esp_spp_cb_t callback);
void onConfirmRequest(ConfirmRequestCb cb);
void onAuthComplete(AuthCompleteCb cb);