BLE5 features to use with C3/S3 (#5085)

Added new BLE5 features to use on C3/S3 family:

extended scan,
extended/multi advertising
New code is not fancy (no feedback from events), but i think it is functional. To get feedback from events i am suggesting to use custom GAP callback, which is already implemented in BLEDevice.
This commit is contained in:
chegewara
2021-04-22 12:01:20 +02:00
committed by GitHub
parent e62ff6dc37
commit 7856de7a57
17 changed files with 909 additions and 1 deletions

View File

@ -124,5 +124,20 @@ public:
virtual void onResult(BLEAdvertisedDevice advertisedDevice) = 0;
};
#ifdef CONFIG_BT_BLE_50_FEATURES_SUPPORTED
class BLEExtAdvertisingCallbacks {
public:
virtual ~BLEExtAdvertisingCallbacks() {}
/**
* @brief Called when a new scan result is detected.
*
* As we are scanning, we will find new devices. When found, this call back is invoked with a reference to the
* device that was found. During any individual scan, a device will only be detected one time.
*/
virtual void onResult(esp_ble_gap_ext_adv_reprot_t report) = 0;
};
#endif // CONFIG_BT_BLE_50_FEATURES_SUPPORTED
#endif /* CONFIG_BLUEDROID_ENABLED */
#endif /* COMPONENTS_CPP_UTILS_BLEADVERTISEDDEVICE_H_ */