mirror of
https://github.com/esphome/esphome.git
synced 2025-09-06 21:32:21 +01:00
BLE loop use (#1882)
This commit is contained in:
@@ -23,17 +23,14 @@ typedef struct {
|
||||
class ESP32BLE : public Component {
|
||||
public:
|
||||
void setup() override;
|
||||
// void loop() override;
|
||||
void loop() override;
|
||||
void dump_config() override;
|
||||
float get_setup_priority() const override;
|
||||
void mark_failed() override;
|
||||
bool can_proceed() override;
|
||||
|
||||
bool has_server() { return this->server_ != nullptr; }
|
||||
bool has_client() { return false; }
|
||||
|
||||
bool is_ready() { return this->ready_; }
|
||||
|
||||
void set_server(BLEServer *server) { this->server_ = server; }
|
||||
|
||||
protected:
|
||||
@@ -45,10 +42,7 @@ class ESP32BLE : public Component {
|
||||
void real_gattc_event_handler_(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param);
|
||||
void real_gap_event_handler_(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param);
|
||||
|
||||
static void ble_core_task_(void *params);
|
||||
static bool ble_setup_();
|
||||
|
||||
bool ready_{false};
|
||||
bool ble_setup_();
|
||||
|
||||
BLEServer *server_{nullptr};
|
||||
Queue<BLEEvent> ble_events_;
|
||||
|
Reference in New Issue
Block a user