@@ -242,32 +242,27 @@ void BluetoothA2DPSink::start(const char* name, bool auto_reconnect)
242
242
}
243
243
244
244
if (is_pin_code_active) {
245
- /* Set default parameters for Secure Simple Pairing */
245
+ // Set default parameters for Secure Simple Pairing
246
246
esp_bt_sp_param_t param_type = ESP_BT_SP_IOCAP_MODE;
247
247
esp_bt_io_cap_t iocap = ESP_BT_IO_CAP_IO;
248
248
esp_bt_gap_set_security_param (param_type, &iocap, sizeof (uint8_t ));
249
-
249
+ // invokes callbacks
250
250
esp_bt_pin_type_t pin_type = ESP_BT_PIN_TYPE_VARIABLE;
251
251
esp_bt_pin_code_t pin_code;
252
252
esp_bt_gap_set_pin (pin_type, 0 , pin_code);
253
253
254
254
} else {
255
- /* Set default parameters for Secure Simple Pairing */
255
+ // Set default parameters for Secure Simple Pairing
256
256
esp_bt_sp_param_t param_type = ESP_BT_SP_IOCAP_MODE;
257
257
esp_bt_io_cap_t iocap = ESP_BT_IO_CAP_NONE;
258
258
esp_bt_gap_set_security_param (param_type, &iocap, sizeof (uint8_t ));
259
-
259
+ // no callbacks
260
260
esp_bt_pin_type_t pin_type = ESP_BT_PIN_TYPE_FIXED;
261
261
esp_bt_pin_code_t pin_code;
262
262
esp_bt_gap_set_pin (pin_type, 0 , pin_code);
263
263
264
264
}
265
265
266
- /*
267
- * Set default parameters for Legacy Pairing
268
- * ESP_BT_PIN_TYPE_VARIABLE will trigger callbacks - pin_code and len is ignored
269
- */
270
-
271
266
}
272
267
273
268
esp_err_t BluetoothA2DPSink::i2s_mclk_pin_select (const uint8_t pin) {
0 commit comments