ESP-NOW bridge for P4 (#573)
This commit is contained in:
@@ -68,6 +68,14 @@ error_t wifi_remove_event_callback(struct Device* device, WifiEventCallback call
|
||||
return WIFI_API(device)->remove_event_callback(device, callback);
|
||||
}
|
||||
|
||||
error_t wifi_get_firmware_ops(struct Device* device, const struct FirmwareOps** ops, void** ctx) {
|
||||
auto* api = WIFI_API(device);
|
||||
if (api->get_firmware_ops == nullptr) {
|
||||
return ERROR_NOT_SUPPORTED;
|
||||
}
|
||||
return api->get_firmware_ops(device, ops, ctx);
|
||||
}
|
||||
|
||||
const struct DeviceType WIFI_TYPE = {
|
||||
.name = "wifi"
|
||||
};
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <tactility/error.h>
|
||||
#include <tactility/filesystem/file_system.h>
|
||||
#include <tactility/module.h>
|
||||
#include <tactility/wifi_auto_scan.h>
|
||||
#include <tactility/service/service_instance.h>
|
||||
#include <tactility/service/service_manager.h>
|
||||
#include <tactility/service/service_paths.h>
|
||||
@@ -326,7 +327,10 @@ const struct ModuleSymbol KERNEL_SYMBOLS[] = {
|
||||
DEFINE_MODULE_SYMBOL(wifi_station_get_rssi),
|
||||
DEFINE_MODULE_SYMBOL(wifi_add_event_callback),
|
||||
DEFINE_MODULE_SYMBOL(wifi_remove_event_callback),
|
||||
DEFINE_MODULE_SYMBOL(wifi_get_firmware_ops),
|
||||
DEFINE_MODULE_SYMBOL(WIFI_TYPE),
|
||||
// wifi_auto_scan
|
||||
DEFINE_MODULE_SYMBOL(wifi_auto_scan_set_paused),
|
||||
// drivers/usb_host_hid
|
||||
DEFINE_MODULE_SYMBOL(usb_host_hid_is_connected),
|
||||
DEFINE_MODULE_SYMBOL(usb_host_hid_subscribe),
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#include <tactility/wifi_auto_scan.h>
|
||||
#include <stddef.h>
|
||||
|
||||
static void (*registeredSetPaused)(bool paused) = NULL;
|
||||
|
||||
void wifi_auto_scan_set_paused_function(void (*set_paused)(bool paused)) {
|
||||
registeredSetPaused = set_paused;
|
||||
}
|
||||
|
||||
void wifi_auto_scan_set_paused(bool paused) {
|
||||
if (registeredSetPaused != NULL) {
|
||||
registeredSetPaused(paused);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user