mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 11:08:36 -07:00
Formatting --nobuild
This commit is contained in:
@@ -71,7 +71,7 @@ static const char* type_names[ContinuityTypeCOUNT] = {
|
||||
[ContinuityTypeNearbyInfo] = "Nearby Info",
|
||||
[ContinuityTypeCustomCrash] = "Continuity Custom",
|
||||
};
|
||||
static const char* continuity_get_name(const ProtocolCfg* _cfg) {
|
||||
static const char* get_name(const ProtocolCfg* _cfg) {
|
||||
const ContinuityCfg* cfg = &_cfg->continuity;
|
||||
return type_names[cfg->type];
|
||||
}
|
||||
@@ -87,7 +87,7 @@ static uint8_t packet_sizes[ContinuityTypeCOUNT] = {
|
||||
[ContinuityTypeNearbyInfo] = HEADER_LEN + 5,
|
||||
[ContinuityTypeCustomCrash] = HEADER_LEN + 11,
|
||||
};
|
||||
static void continuity_make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
||||
static void make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
||||
const ContinuityCfg* cfg = _cfg ? &_cfg->continuity : NULL;
|
||||
|
||||
ContinuityType type;
|
||||
@@ -376,7 +376,7 @@ static void na_action_changed(VariableItem* item) {
|
||||
variable_item_set_current_value_text(item, "Random");
|
||||
}
|
||||
}
|
||||
static void continuity_extra_config(Ctx* ctx) {
|
||||
static void extra_config(Ctx* ctx) {
|
||||
ContinuityCfg* cfg = &ctx->attack->payload.cfg.continuity;
|
||||
VariableItemList* list = ctx->variable_item_list;
|
||||
VariableItem* item;
|
||||
@@ -502,17 +502,17 @@ static uint8_t config_counts[ContinuityTypeCOUNT] = {
|
||||
[ContinuityTypeNearbyInfo] = 0,
|
||||
[ContinuityTypeCustomCrash] = ConfigCcCOUNT - ConfigExtraStart - 1,
|
||||
};
|
||||
static uint8_t continuity_config_count(const ProtocolCfg* _cfg) {
|
||||
static uint8_t config_count(const ProtocolCfg* _cfg) {
|
||||
const ContinuityCfg* cfg = &_cfg->continuity;
|
||||
return config_counts[cfg->type];
|
||||
}
|
||||
|
||||
const Protocol protocol_continuity = {
|
||||
.icon = &I_apple,
|
||||
.get_name = continuity_get_name,
|
||||
.make_packet = continuity_make_packet,
|
||||
.extra_config = continuity_extra_config,
|
||||
.config_count = continuity_config_count,
|
||||
.get_name = get_name,
|
||||
.make_packet = make_packet,
|
||||
.extra_config = extra_config,
|
||||
.config_count = config_count,
|
||||
};
|
||||
|
||||
static void pp_model_callback(void* _ctx, uint32_t index) {
|
||||
|
||||
@@ -68,7 +68,7 @@ static const char* type_names[EasysetupTypeCOUNT] = {
|
||||
[EasysetupTypeBuds] = "EasySetup Buds",
|
||||
[EasysetupTypeWatch] = "EasySetup Watch",
|
||||
};
|
||||
static const char* easysetup_get_name(const ProtocolCfg* _cfg) {
|
||||
static const char* get_name(const ProtocolCfg* _cfg) {
|
||||
const EasysetupCfg* cfg = &_cfg->easysetup;
|
||||
return type_names[cfg->type];
|
||||
}
|
||||
@@ -77,7 +77,7 @@ static uint8_t packet_sizes[EasysetupTypeCOUNT] = {
|
||||
[EasysetupTypeBuds] = 31,
|
||||
[EasysetupTypeWatch] = 15,
|
||||
};
|
||||
void easysetup_make_packet(uint8_t* out_size, uint8_t** out_packet, const ProtocolCfg* _cfg) {
|
||||
void make_packet(uint8_t* out_size, uint8_t** out_packet, const ProtocolCfg* _cfg) {
|
||||
const EasysetupCfg* cfg = _cfg ? &_cfg->easysetup : NULL;
|
||||
|
||||
EasysetupType type;
|
||||
@@ -241,7 +241,7 @@ static void watch_model_changed(VariableItem* item) {
|
||||
variable_item_set_current_value_text(item, "Random");
|
||||
}
|
||||
}
|
||||
static void easysetup_extra_config(Ctx* ctx) {
|
||||
static void extra_config(Ctx* ctx) {
|
||||
EasysetupCfg* cfg = &ctx->attack->payload.cfg.easysetup;
|
||||
VariableItemList* list = ctx->variable_item_list;
|
||||
VariableItem* item;
|
||||
@@ -313,17 +313,17 @@ static uint8_t config_counts[EasysetupTypeCOUNT] = {
|
||||
[EasysetupTypeBuds] = ConfigBudsCOUNT - ConfigExtraStart - 1,
|
||||
[EasysetupTypeWatch] = ConfigWatchCOUNT - ConfigExtraStart - 1,
|
||||
};
|
||||
static uint8_t easysetup_config_count(const ProtocolCfg* _cfg) {
|
||||
static uint8_t config_count(const ProtocolCfg* _cfg) {
|
||||
const EasysetupCfg* cfg = &_cfg->easysetup;
|
||||
return config_counts[cfg->type];
|
||||
}
|
||||
|
||||
const Protocol protocol_easysetup = {
|
||||
.icon = &I_android,
|
||||
.get_name = easysetup_get_name,
|
||||
.make_packet = easysetup_make_packet,
|
||||
.extra_config = easysetup_extra_config,
|
||||
.config_count = easysetup_config_count,
|
||||
.get_name = get_name,
|
||||
.make_packet = make_packet,
|
||||
.extra_config = extra_config,
|
||||
.config_count = config_count,
|
||||
};
|
||||
|
||||
static void buds_model_callback(void* _ctx, uint32_t index) {
|
||||
|
||||
@@ -12,7 +12,7 @@ const struct {
|
||||
{0x00000C, "Set Up Device"},
|
||||
|
||||
// Genuine devices
|
||||
{0x00000a, "Anti-Spoofing Test (lmao)"},
|
||||
{0x00000A, "Anti-Spoofing Test (lmao)"},
|
||||
{0x0001F0, "Bisto CSR8670 Dev Board"},
|
||||
{0x000047, "Arduino 101"},
|
||||
{0xCD8256, "Bose NC 700"},
|
||||
@@ -46,12 +46,12 @@ const struct {
|
||||
};
|
||||
const uint8_t models_count = COUNT_OF(models);
|
||||
|
||||
static const char* fastpair_get_name(const ProtocolCfg* _cfg) {
|
||||
static const char* get_name(const ProtocolCfg* _cfg) {
|
||||
UNUSED(_cfg);
|
||||
return "FastPair";
|
||||
}
|
||||
|
||||
static void fastpair_make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
||||
static void make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
||||
const FastpairCfg* cfg = _cfg ? &_cfg->fastpair : NULL;
|
||||
|
||||
uint32_t model;
|
||||
@@ -118,7 +118,7 @@ static void model_changed(VariableItem* item) {
|
||||
variable_item_set_current_value_text(item, "Random");
|
||||
}
|
||||
}
|
||||
static void fastpair_extra_config(Ctx* ctx) {
|
||||
static void extra_config(Ctx* ctx) {
|
||||
FastpairCfg* cfg = &ctx->attack->payload.cfg.fastpair;
|
||||
VariableItemList* list = ctx->variable_item_list;
|
||||
VariableItem* item;
|
||||
@@ -152,17 +152,17 @@ static void fastpair_extra_config(Ctx* ctx) {
|
||||
variable_item_list_set_enter_callback(list, config_callback, ctx);
|
||||
}
|
||||
|
||||
static uint8_t fastpair_config_count(const ProtocolCfg* _cfg) {
|
||||
static uint8_t config_count(const ProtocolCfg* _cfg) {
|
||||
UNUSED(_cfg);
|
||||
return ConfigCOUNT - ConfigExtraStart - 1;
|
||||
}
|
||||
|
||||
const Protocol protocol_fastpair = {
|
||||
.icon = &I_android,
|
||||
.get_name = fastpair_get_name,
|
||||
.make_packet = fastpair_make_packet,
|
||||
.extra_config = fastpair_extra_config,
|
||||
.config_count = fastpair_config_count,
|
||||
.get_name = get_name,
|
||||
.make_packet = make_packet,
|
||||
.extra_config = extra_config,
|
||||
.config_count = config_count,
|
||||
};
|
||||
|
||||
static void model_callback(void* _ctx, uint32_t index) {
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
// Hacked together by @Willy-JL and @Spooks4576
|
||||
// Documentation at https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/bluetooth-swift-pair
|
||||
|
||||
static const char* swiftpair_get_name(const ProtocolCfg* _cfg) {
|
||||
static const char* get_name(const ProtocolCfg* _cfg) {
|
||||
UNUSED(_cfg);
|
||||
return "SwiftPair";
|
||||
}
|
||||
|
||||
static void swiftpair_make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
||||
static void make_packet(uint8_t* _size, uint8_t** _packet, const ProtocolCfg* _cfg) {
|
||||
const SwiftpairCfg* cfg = _cfg ? &_cfg->swiftpair : NULL;
|
||||
|
||||
const char* name;
|
||||
@@ -66,7 +66,7 @@ static void config_callback(void* _ctx, uint32_t index) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
static void swiftpair_extra_config(Ctx* ctx) {
|
||||
static void extra_config(Ctx* ctx) {
|
||||
SwiftpairCfg* cfg = &ctx->attack->payload.cfg.swiftpair;
|
||||
VariableItemList* list = ctx->variable_item_list;
|
||||
VariableItem* item;
|
||||
@@ -79,17 +79,17 @@ static void swiftpair_extra_config(Ctx* ctx) {
|
||||
variable_item_list_set_enter_callback(list, config_callback, ctx);
|
||||
}
|
||||
|
||||
static uint8_t swiftpair_config_count(const ProtocolCfg* _cfg) {
|
||||
static uint8_t config_count(const ProtocolCfg* _cfg) {
|
||||
UNUSED(_cfg);
|
||||
return ConfigCOUNT - ConfigExtraStart - 1;
|
||||
}
|
||||
|
||||
const Protocol protocol_swiftpair = {
|
||||
.icon = &I_windows,
|
||||
.get_name = swiftpair_get_name,
|
||||
.make_packet = swiftpair_make_packet,
|
||||
.extra_config = swiftpair_extra_config,
|
||||
.config_count = swiftpair_config_count,
|
||||
.get_name = get_name,
|
||||
.make_packet = make_packet,
|
||||
.extra_config = extra_config,
|
||||
.config_count = config_count,
|
||||
};
|
||||
|
||||
static void name_callback(void* _ctx) {
|
||||
|
||||
Reference in New Issue
Block a user