1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-12 04:41:26 +04:00

Furi: wrap message queue in container, prepare it for epoll. Accessor: disable expansion service on start. (#3672)

* Furi: wrap message queue in container, prepare it for epoll. Accessor: disable expansion service on start.
* Furi: one allocation, smaller message queue struct, type compatibility with FreeRTOS.
This commit is contained in:
あく
2024-05-30 12:58:03 +01:00
committed by GitHub
parent f309844ee0
commit 3f04d6dd46
5 changed files with 38 additions and 15 deletions

View File

@@ -34,12 +34,16 @@ void AccessorApp::run(void) {
AccessorApp::AccessorApp()
: text_store{0} {
notification = static_cast<NotificationApp*>(furi_record_open(RECORD_NOTIFICATION));
expansion = static_cast<Expansion*>(furi_record_open(RECORD_EXPANSION));
onewire_host = onewire_host_alloc(&gpio_ibutton);
expansion_disable(expansion);
furi_hal_power_enable_otg();
}
AccessorApp::~AccessorApp() {
furi_hal_power_disable_otg();
expansion_enable(expansion);
furi_record_close(RECORD_EXPANSION);
furi_record_close(RECORD_NOTIFICATION);
onewire_host_free(onewire_host);
}

View File

@@ -6,6 +6,7 @@
#include "helpers/wiegand.h"
#include <one_wire/one_wire_host.h>
#include <notification/notification_messages.h>
#include <expansion/expansion.h>
class AccessorApp {
public:
@@ -51,4 +52,5 @@ private:
OneWireHost* onewire_host;
NotificationApp* notification;
Expansion* expansion;
};