BLE Spam refactor namespace and use viewdispatcher

This commit is contained in:
Willy-JL
2023-10-18 05:13:43 +01:00
parent 9abe7cf3d2
commit dfc2309a3a
10 changed files with 99 additions and 79 deletions

View File

@@ -4,13 +4,13 @@
// Hacked together by @Willy-JL and @Spooks4576
// Documentation at https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/bluetooth-swift-pair
const char* swiftpair_get_name(const BleSpamProtocolCfg* _cfg) {
const char* swiftpair_get_name(const ProtocolCfg* _cfg) {
const SwiftpairCfg* cfg = &_cfg->swiftpair;
UNUSED(cfg);
return "SwiftPair";
}
void swiftpair_make_packet(uint8_t* _size, uint8_t** _packet, const BleSpamProtocolCfg* _cfg) {
void swiftpair_make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
const SwiftpairCfg* cfg = _cfg ? &_cfg->swiftpair : NULL;
const char* display_name;
@@ -47,7 +47,7 @@ void swiftpair_make_packet(uint8_t* _size, uint8_t** _packet, const BleSpamProto
*_packet = packet;
}
const BleSpamProtocol ble_spam_protocol_swiftpair = {
const Protocol protocol_swiftpair = {
.icon = &I_windows,
.get_name = swiftpair_get_name,
.make_packet = swiftpair_make_packet,