mirror of
https://protopirate.net/ProtoPirate/ProtoPirate.git
synced 2026-10-01 08:17:56 +00:00
* Removed dependencies on App Struct in Plugin Module * Cleaned up headers * Only check navigation events if plugin doesnt handle the event
46 lines
1.4 KiB
C
46 lines
1.4 KiB
C
#include "../protopirate_protocol_plugins.h"
|
|
#include "../protocols_common.h"
|
|
#include <lib/flipper_application/flipper_application.h>
|
|
|
|
#ifndef PP_TX_PROTOCOL_HEADER
|
|
#error "PP_TX_PROTOCOL_HEADER must be defined for TX protocol plugins"
|
|
#endif
|
|
|
|
#include PP_TX_PROTOCOL_HEADER
|
|
|
|
#ifndef PP_TX_PROTOCOL_NAME
|
|
#error "PP_TX_PROTOCOL_NAME must be defined for TX protocol plugins"
|
|
#endif
|
|
|
|
#ifndef PP_TX_PROTOCOL_ITEM
|
|
#error "PP_TX_PROTOCOL_ITEM must be defined for TX protocol plugins"
|
|
#endif
|
|
|
|
static const SubGhzProtocol* const protopirate_tx_protocol_registry_items[] = {
|
|
&PP_TX_PROTOCOL_ITEM,
|
|
};
|
|
|
|
static const SubGhzProtocolRegistry protopirate_tx_protocol_registry = {
|
|
.items = protopirate_tx_protocol_registry_items,
|
|
.size = 1U,
|
|
};
|
|
|
|
static const ProtoPirateProtocolPlugin protopirate_tx_protocol_plugin = {
|
|
.plugin_name = PP_TX_PROTOCOL_NAME,
|
|
.kind = ProtoPirateProtocolPluginKindTx,
|
|
.route = ProtoPirateProtocolRegistryRouteAMDefault,
|
|
.protocol_name = PP_TX_PROTOCOL_NAME,
|
|
.registry = &protopirate_tx_protocol_registry,
|
|
.release = pp_shared_upload_release,
|
|
};
|
|
|
|
static const FlipperAppPluginDescriptor protopirate_tx_protocol_plugin_descriptor = {
|
|
.appid = PROTOPIRATE_PROTOCOL_PLUGIN_APP_ID,
|
|
.ep_api_version = PROTOPIRATE_PROTOCOL_PLUGIN_API_VERSION,
|
|
.entry_point = &protopirate_tx_protocol_plugin,
|
|
};
|
|
|
|
const FlipperAppPluginDescriptor* protopirate_tx_protocol_plugin_ep(void) {
|
|
return &protopirate_tx_protocol_plugin_descriptor;
|
|
}
|