mirror of
https://github.com/esphome/esphome.git
synced 2025-11-18 15:55:46 +00:00
Initial Support for RP2040 platform (#3284)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
@@ -24,6 +24,16 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_RP2040
|
||||
extern "C" {
|
||||
#include "cyw43.h"
|
||||
#include "cyw43_country.h"
|
||||
#include "pico/cyw43_arch.h"
|
||||
}
|
||||
|
||||
#include <WiFi.h>
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace wifi {
|
||||
|
||||
@@ -138,6 +148,8 @@ class WiFiScanResult {
|
||||
float get_priority() const { return priority_; }
|
||||
void set_priority(float priority) { priority_ = priority; }
|
||||
|
||||
bool operator==(const WiFiScanResult &rhs) const;
|
||||
|
||||
protected:
|
||||
bool matches_{false};
|
||||
bssid_t bssid_;
|
||||
@@ -310,6 +322,11 @@ class WiFiComponent : public Component {
|
||||
void wifi_process_event_(IDFWiFiEvent *data);
|
||||
#endif
|
||||
|
||||
#ifdef USE_RP2040
|
||||
static int s_wifi_scan_result(void *env, const cyw43_ev_scan_result_t *result);
|
||||
void wifi_scan_result(void *env, const cyw43_ev_scan_result_t *result);
|
||||
#endif
|
||||
|
||||
std::string use_address_;
|
||||
std::vector<WiFiAP> sta_;
|
||||
std::vector<WiFiSTAPriority> sta_priorities_;
|
||||
|
||||
Reference in New Issue
Block a user