| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #pragma once
- #include <stdbool.h>
- #include <stdint.h>
- #include <stddef.h>
- #include <lib/flipper_format/flipper_format.h>
- #include <furi.h>
- #include <furi_hal.h>
- #include "../types.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct SubGhzBlockGeneric SubGhzBlockGeneric;
- struct SubGhzBlockGeneric {
- const char* protocol_name;
- uint64_t data;
- uint32_t serial;
- uint16_t data_count_bit;
- uint8_t btn;
- uint32_t cnt;
- };
- /**
- * Get name preset.
- * @param preset_name name preset
- * @param preset_str Output name preset
- */
- void subghz_block_generic_get_preset_name(const char* preset_name, FuriString* preset_str);
- /**
- * Serialize data SubGhzBlockGeneric.
- * @param instance Pointer to a SubGhzBlockGeneric instance
- * @param flipper_format Pointer to a FlipperFormat instance
- * @param preset The modulation on which the signal was received, SubGhzRadioPreset
- * @return true On success
- */
- bool subghz_block_generic_serialize(
- SubGhzBlockGeneric* instance,
- FlipperFormat* flipper_format,
- SubGhzRadioPreset* preset);
- /**
- * Deserialize data SubGhzBlockGeneric.
- * @param instance Pointer to a SubGhzBlockGeneric instance
- * @param flipper_format Pointer to a FlipperFormat instance
- * @return true On success
- */
- bool subghz_block_generic_deserialize(SubGhzBlockGeneric* instance, FlipperFormat* flipper_format);
- #ifdef __cplusplus
- }
- #endif
|