flipperzero-firmware/applications/main/subghz/helpers/subghz_txrx_create_potocol_key.h
Skorpionm d2ca67d261
[FL-3242] SubGhz: refactoring app (#2554)
* SubGhz: add SubGhzThresholdRssi
* SubGhz: remove direct reading of subghz-txrx-txrx_state
* SubGhz: remove direct reading subghz->txrx->hopper_state
* SubGhz: remove direct reading subghz->lock
* SubGhz: check load type file
* SubGhz: remove direct reading subghz->txrx->rx_key_state
* SubGhz: remove direct reading subghz->txrx->speaker_state
* SubGhz: refactoring subghz_scene_set_type.c
* SubGhz: moving "txrx" entity to a separate file
* SubGhz: show error tx start
* SubGhz: refactoring RPC
* SubGhz: value get optimizations
* SubGhz: fix name file
* SubGhz: add function description
* SubGhz: fix double back with a blocked transmission in this region and speacker, when a transmission is blocked in this region
* SubGhz: correct spelling
* SubGhz: better naming
* SubGhz: simplify includes

Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-05-04 12:04:26 +09:00

96 lines
2.2 KiB
C

#pragma once
#include "subghz_types.h"
#include "subghz_txrx.h"
/**
* Generate data for protocol
*
* @param instance Pointer to a SubGhzTxRx
* @param preset_name Name of preset
* @param frequency Frequency in Hz
* @param protocol_name Name of protocol
* @param key Key
* @param bit Bit
* @return bool True if success
*/
bool subghz_txrx_gen_data_protocol(
void* context,
const char* preset_name,
uint32_t frequency,
const char* protocol_name,
uint64_t key,
uint32_t bit);
/**
* Generate data for protocol and te
*
* @param instance Pointer to a SubGhzTxRx
* @param preset_name Name of preset
* @param frequency Frequency in Hz
* @param protocol_name Name of protocol
* @param key Key
* @param bit Bit
* @param te Te
* @return bool True if success
*/
bool subghz_txrx_gen_data_protocol_and_te(
SubGhzTxRx* instance,
const char* preset_name,
uint32_t frequency,
const char* protocol_name,
uint64_t key,
uint32_t bit,
uint32_t te);
/**
* Generate data Keeloq protocol
*
* @param instance Pointer to a SubGhzTxRx
* @param name_preset Name of preset
* @param frequency Frequency in Hz
* @param name_sysmem Name of Keeloq sysmem
* @param serial Serial number
* @param btn Button
* @param cnt Counter
* @return bool True if success
*/
bool subghz_txrx_gen_keelog_protocol(
SubGhzTxRx* instance,
const char* name_preset,
uint32_t frequency,
const char* name_sysmem,
uint32_t serial,
uint8_t btn,
uint16_t cnt);
/**
* Generate data SecPlus v2 protocol
*
* @param instance Pointer to a SubGhzTxRx
* @param name_preset Name of preset
* @param frequency Frequency in Hz
* @param serial Serial number
* @param btn Button
* @param cnt Counter
* @return bool True if success
*/
bool subghz_txrx_gen_secplus_v2_protocol(
SubGhzTxRx* instance,
const char* name_preset,
uint32_t frequency,
uint32_t serial,
uint8_t btn,
uint32_t cnt);
/**
* Generate data SecPlus v1 protocol
*
* @param instance Pointer to a SubGhzTxRx
* @param name_preset Name of preset
* @param frequency Frequency in Hz
* @return bool True if success
*/
bool subghz_txrx_gen_secplus_v1_protocol(
SubGhzTxRx* instance,
const char* name_preset,
uint32_t frequency);