mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 20:49:49 +04:00
Prepare subghz changes
This commit is contained in:
70
applications/subghz/helpers/subghz_types.h
Normal file
70
applications/subghz/helpers/subghz_types.h
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/** SubGhzNotification state */
|
||||||
|
typedef enum {
|
||||||
|
SubGhzNotificationStateStarting,
|
||||||
|
SubGhzNotificationStateIDLE,
|
||||||
|
SubGhzNotificationStateTx,
|
||||||
|
SubGhzNotificationStateRx,
|
||||||
|
SubGhzNotificationStateRxDone,
|
||||||
|
} SubGhzNotificationState;
|
||||||
|
|
||||||
|
/** SubGhzTxRx state */
|
||||||
|
typedef enum {
|
||||||
|
SubGhzTxRxStateIDLE,
|
||||||
|
SubGhzTxRxStateRx,
|
||||||
|
SubGhzTxRxStateTx,
|
||||||
|
SubGhzTxRxStateSleep,
|
||||||
|
} SubGhzTxRxState;
|
||||||
|
|
||||||
|
/** SubGhzHopperState state */
|
||||||
|
typedef enum {
|
||||||
|
SubGhzHopperStateOFF,
|
||||||
|
SubGhzHopperStateRunnig,
|
||||||
|
SubGhzHopperStatePause,
|
||||||
|
SubGhzHopperStateRSSITimeOut,
|
||||||
|
} SubGhzHopperState;
|
||||||
|
|
||||||
|
/** SubGhzRxKeyState state */
|
||||||
|
typedef enum {
|
||||||
|
SubGhzRxKeyStateIDLE,
|
||||||
|
SubGhzRxKeyStateNoSave,
|
||||||
|
SubGhzRxKeyStateNeedSave,
|
||||||
|
SubGhzRxKeyStateBack,
|
||||||
|
SubGhzRxKeyStateStart,
|
||||||
|
SubGhzRxKeyStateAddKey,
|
||||||
|
SubGhzRxKeyStateExit,
|
||||||
|
SubGhzRxKeyStateRAWLoad,
|
||||||
|
SubGhzRxKeyStateRAWSave,
|
||||||
|
} SubGhzRxKeyState;
|
||||||
|
|
||||||
|
/** SubGhzLoadKeyState state */
|
||||||
|
typedef enum {
|
||||||
|
SubGhzLoadKeyStateUnknown,
|
||||||
|
SubGhzLoadKeyStateOK,
|
||||||
|
SubGhzLoadKeyStateParseErr,
|
||||||
|
SubGhzLoadKeyStateOnlyRx,
|
||||||
|
} SubGhzLoadKeyState;
|
||||||
|
|
||||||
|
/** SubGhzLock */
|
||||||
|
typedef enum {
|
||||||
|
SubGhzLockOff,
|
||||||
|
SubGhzLockOn,
|
||||||
|
} SubGhzLock;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
SubGhzViewIdMenu,
|
||||||
|
SubGhzViewIdReceiver,
|
||||||
|
SubGhzViewIdPopup,
|
||||||
|
SubGhzViewIdTextInput,
|
||||||
|
SubGhzViewIdByteInput,
|
||||||
|
SubGhzViewIdWidget,
|
||||||
|
SubGhzViewIdTransmitter,
|
||||||
|
SubGhzViewIdVariableItemList,
|
||||||
|
SubGhzViewIdFrequencyAnalyzer,
|
||||||
|
SubGhzViewIdReadRAW,
|
||||||
|
|
||||||
|
SubGhzViewIdStatic,
|
||||||
|
SubGhzViewIdTestCarrier,
|
||||||
|
SubGhzViewIdTestPacket,
|
||||||
|
} SubGhzViewId;
|
||||||
@@ -38,52 +38,6 @@
|
|||||||
|
|
||||||
#define SUBGHZ_MAX_LEN_NAME 64
|
#define SUBGHZ_MAX_LEN_NAME 64
|
||||||
|
|
||||||
/** SubGhzNotification state */
|
|
||||||
typedef enum {
|
|
||||||
SubGhzNotificationStateStarting,
|
|
||||||
SubGhzNotificationStateIDLE,
|
|
||||||
SubGhzNotificationStateTx,
|
|
||||||
SubGhzNotificationStateRx,
|
|
||||||
SubGhzNotificationStateRxDone,
|
|
||||||
} SubGhzNotificationState;
|
|
||||||
|
|
||||||
/** SubGhzTxRx state */
|
|
||||||
typedef enum {
|
|
||||||
SubGhzTxRxStateIDLE,
|
|
||||||
SubGhzTxRxStateRx,
|
|
||||||
SubGhzTxRxStateTx,
|
|
||||||
SubGhzTxRxStateSleep,
|
|
||||||
} SubGhzTxRxState;
|
|
||||||
|
|
||||||
/** SubGhzHopperState state */
|
|
||||||
typedef enum {
|
|
||||||
SubGhzHopperStateOFF,
|
|
||||||
SubGhzHopperStateRunnig,
|
|
||||||
SubGhzHopperStatePause,
|
|
||||||
SubGhzHopperStateRSSITimeOut,
|
|
||||||
} SubGhzHopperState;
|
|
||||||
|
|
||||||
/** SubGhzRxKeyState state */
|
|
||||||
typedef enum {
|
|
||||||
SubGhzRxKeyStateIDLE,
|
|
||||||
SubGhzRxKeyStateNoSave,
|
|
||||||
SubGhzRxKeyStateNeedSave,
|
|
||||||
SubGhzRxKeyStateBack,
|
|
||||||
SubGhzRxKeyStateStart,
|
|
||||||
SubGhzRxKeyStateAddKey,
|
|
||||||
SubGhzRxKeyStateExit,
|
|
||||||
SubGhzRxKeyStateRAWLoad,
|
|
||||||
SubGhzRxKeyStateRAWSave,
|
|
||||||
} SubGhzRxKeyState;
|
|
||||||
|
|
||||||
/** SubGhzLoadKeyState state */
|
|
||||||
typedef enum {
|
|
||||||
SubGhzLoadKeyStateUnknown,
|
|
||||||
SubGhzLoadKeyStateOK,
|
|
||||||
SubGhzLoadKeyStateParseErr,
|
|
||||||
SubGhzLoadKeyStateOnlyRx,
|
|
||||||
} SubGhzLoadKeyState;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t fix[4];
|
uint8_t fix[4];
|
||||||
uint8_t cnt[2];
|
uint8_t cnt[2];
|
||||||
@@ -144,25 +98,9 @@ struct SubGhz {
|
|||||||
SubGhzTestPacket* subghz_test_packet;
|
SubGhzTestPacket* subghz_test_packet;
|
||||||
string_t error_str;
|
string_t error_str;
|
||||||
SubGhzSetting* setting;
|
SubGhzSetting* setting;
|
||||||
|
SubGhzLock lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
SubGhzViewIdMenu,
|
|
||||||
SubGhzViewIdReceiver,
|
|
||||||
SubGhzViewIdPopup,
|
|
||||||
SubGhzViewIdTextInput,
|
|
||||||
SubGhzViewIdByteInput,
|
|
||||||
SubGhzViewIdWidget,
|
|
||||||
SubGhzViewIdTransmitter,
|
|
||||||
SubGhzViewIdVariableItemList,
|
|
||||||
SubGhzViewIdFrequencyAnalyzer,
|
|
||||||
SubGhzViewIdReadRAW,
|
|
||||||
|
|
||||||
SubGhzViewIdStatic,
|
|
||||||
SubGhzViewIdTestCarrier,
|
|
||||||
SubGhzViewIdTestPacket,
|
|
||||||
} SubGhzViewId;
|
|
||||||
|
|
||||||
bool subghz_set_preset(SubGhz* subghz, const char* preset);
|
bool subghz_set_preset(SubGhz* subghz, const char* preset);
|
||||||
void subghz_get_frequency_modulation(SubGhz* subghz, string_t frequency, string_t modulation);
|
void subghz_get_frequency_modulation(SubGhz* subghz, string_t frequency, string_t modulation);
|
||||||
void subghz_begin(SubGhz* subghz, FuriHalSubGhzPreset preset);
|
void subghz_begin(SubGhz* subghz, FuriHalSubGhzPreset preset);
|
||||||
|
|||||||
Reference in New Issue
Block a user