mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-10-11 09:12:32 +02:00
* Fix Typos * Tune decoders * Better parsing, show more data in existing protocols * Add new protocols * Update keeloqs * Add unit tests & raws * Add honeywell unittest * Comment until better solution is found Adding GAPs to be sent first to make signal better suitable for decoder (decoding from only one signal sample) does nothing, needs something else TODO: Fix encoders? * suppressed missing issue warning * subghz: re-enabled failing encoder tests * Fix two? 3 left * properly do gangqi and marantec for unit test and real use * fix unit tests now * fix possible memory leak * reset decoder step too * subghz: extra encoder safety; report random signal test results on failure * unit_tests: subghz: renamed test file for consistency * subghz: more explicit buffer position resets * Fix gangqi samples --------- Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su>
234 lines
6.8 KiB
C
234 lines
6.8 KiB
C
#pragma once
|
|
|
|
#include "../types.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* Key generation from simple data.
|
|
* @param context Pointer to a SubGhzProtocolEncoderSecPlus_v2 instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @param serial Serial number, 32 bit
|
|
* @param btn Button number, 8 bit
|
|
* @param cnt Container value, 28 bit
|
|
* @param manufacture_name Name of manufacturer's key
|
|
* @param preset Modulation, SubGhzRadioPreset
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_secplus_v2_create_data(
|
|
void* context,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t serial,
|
|
uint8_t btn,
|
|
uint32_t cnt,
|
|
SubGhzRadioPreset* preset);
|
|
|
|
/**
|
|
* Key generation from simple data.
|
|
* @param context Pointer to a SubGhzProtocolEncoderKeeloq instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @param serial Serial number, 28 bit
|
|
* @param btn Button number, 4 bit
|
|
* @param cnt Counter value, 16 bit
|
|
* @param manufacture_name Name of manufacturer's key
|
|
* @param preset Modulation, SubGhzRadioPreset
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_keeloq_create_data(
|
|
void* context,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t serial,
|
|
uint8_t btn,
|
|
uint16_t cnt,
|
|
const char* manufacture_name,
|
|
SubGhzRadioPreset* preset);
|
|
|
|
/**
|
|
* Key generation for BFT.
|
|
* @param context Pointer to a SubGhzProtocolEncoderKeeloq instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @param serial Serial number, 28 bit
|
|
* @param btn Button number, 4 bit
|
|
* @param cnt Counter value, 16 bit
|
|
* @param seed Seed value, 32 bit
|
|
* @param manufacture_name Name of manufacturer's key
|
|
* @param preset Modulation, SubGhzRadioPreset
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_keeloq_bft_create_data(
|
|
void* context,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t serial,
|
|
uint8_t btn,
|
|
uint16_t cnt,
|
|
uint32_t seed,
|
|
const char* manufacture_name,
|
|
SubGhzRadioPreset* preset);
|
|
|
|
/**
|
|
* Key generation from simple data.
|
|
* @param context Pointer to a SubGhzProtocolEncoderFaacSLH instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @param serial Serial number, 28 bit
|
|
* @param btn Button number, 4 bit
|
|
* @param cnt Counter value, 16 bit
|
|
* @param seed Seed value, 32 bit
|
|
* @param manufacture_name Name of manufacturer's key
|
|
* @param preset Modulation, SubGhzRadioPreset
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_faac_slh_create_data(
|
|
void* context,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t serial,
|
|
uint8_t btn,
|
|
uint32_t cnt,
|
|
uint32_t seed,
|
|
const char* manufacture_name,
|
|
SubGhzRadioPreset* preset);
|
|
|
|
/**
|
|
* Key generation from simple data.
|
|
* @param context Pointer to a SubGhzProtocolEncoderAlutech_at_4n instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @param serial Serial number, 24 bit
|
|
* @param btn Button number, 8 bit
|
|
* @param cnt Counter value, 16 bit
|
|
* @param preset Modulation, SubGhzRadioPreset
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_alutech_at_4n_create_data(
|
|
void* context,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t serial,
|
|
uint8_t btn,
|
|
uint16_t cnt,
|
|
SubGhzRadioPreset* preset);
|
|
|
|
/**
|
|
* Key generation from simple data.
|
|
* @param context Pointer to a SubGhzProtocolEncoderCameAtomo instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @param serial Serial number, 24 bit
|
|
* @param cnt Counter value, 16 bit
|
|
* @param preset Modulation, SubGhzRadioPreset
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_came_atomo_create_data(
|
|
void* context,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t serial,
|
|
uint16_t cnt,
|
|
SubGhzRadioPreset* preset);
|
|
|
|
/**
|
|
* Key generation from simple data.
|
|
* @param context Pointer to a SubGhzProtocolEncoderPhoenix_V2 instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @param serial Serial number
|
|
* @param cnt Counter value, 16 bit
|
|
* @param preset Modulation, SubGhzRadioPreset
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_phoenix_v2_create_data(
|
|
void* context,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t serial,
|
|
uint16_t cnt,
|
|
SubGhzRadioPreset* preset);
|
|
|
|
/**
|
|
* New remote generation.
|
|
* @param context Pointer to a SubGhzProtocolEncoderNiceFlorS instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @param serial Serial number
|
|
* @param btn Button number, 4 bit
|
|
* @param cnt Counter value, 16 bit
|
|
* @param preset Modulation, SubGhzRadioPreset
|
|
* @param nice_one Nice One if true, Nice Flor S if false
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_nice_flor_s_create_data(
|
|
void* context,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t serial,
|
|
uint8_t btn,
|
|
uint16_t cnt,
|
|
SubGhzRadioPreset* preset,
|
|
bool nice_one);
|
|
|
|
/**
|
|
* Key generation from simple data.
|
|
* @param context Pointer to a SubGhzProtocolEncoderStarLine instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @param serial Serial number, 24 bit
|
|
* @param btn Button number, 8 bit
|
|
* @param cnt Counter value, 16 bit
|
|
* @param manufacture_name Name of manufacturer's key
|
|
* @param preset Modulation, SubGhzRadioPreset
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_star_line_create_data(
|
|
void* context,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t serial,
|
|
uint8_t btn,
|
|
uint16_t cnt,
|
|
const char* manufacture_name,
|
|
SubGhzRadioPreset* preset);
|
|
|
|
/**
|
|
* Key generation from simple data.
|
|
* @param context Pointer to a SubGhzProtocolEncoderSomfyTelis instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @param serial Serial number, 24 bit
|
|
* @param btn Button number, 8 bit
|
|
* @param cnt Counter value, 16 bit
|
|
* @param preset Modulation, SubGhzRadioPreset
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_somfy_telis_create_data(
|
|
void* context,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t serial,
|
|
uint8_t btn,
|
|
uint16_t cnt,
|
|
SubGhzRadioPreset* preset);
|
|
|
|
/**
|
|
* Key generation from simple data.
|
|
* @param context Pointer to a SubGhzProtocolEncoderSomfyKeytis instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @param serial Serial number, 24 bit
|
|
* @param btn Button number, 8 bit
|
|
* @param cnt Counter value, 16 bit
|
|
* @param preset Modulation, SubGhzRadioPreset
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_somfy_keytis_create_data(
|
|
void* context,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t serial,
|
|
uint8_t btn,
|
|
uint16_t cnt,
|
|
SubGhzRadioPreset* preset);
|
|
|
|
typedef struct SubGhzProtocolDecoderBinRAW SubGhzProtocolDecoderBinRAW;
|
|
|
|
void subghz_protocol_decoder_bin_raw_data_input_rssi(
|
|
SubGhzProtocolDecoderBinRAW* instance,
|
|
float rssi);
|
|
|
|
/**
|
|
* Validation of fixed parts SubGhzProtocolDecoderSecPlus_v1.
|
|
* @param fixed fixed parts
|
|
* @return true On success
|
|
*/
|
|
bool subghz_protocol_secplus_v1_check_fixed(uint32_t fixed);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|