forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff1f219
commit a64ada2
Showing
21 changed files
with
553 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
#pragma once | ||
|
||
#include <stdbool.h> | ||
#include <stddef.h> | ||
#include <stdlib.h> | ||
#include <m-array.h> | ||
#include <toolbox/path.h> | ||
#include <storage/storage.h> | ||
#include <core/common_defines.h> | ||
#include <flipper_format/flipper_format.h> | ||
#include <lib/subghz/protocols/raw.h> | ||
//#include <lib/toolbox/path.h> | ||
//#include <flipper_format/flipper_format_i.h> | ||
#include <lib/toolbox/stream/stream.h> | ||
#include <lib/subghz/protocols/protocol_items.h> | ||
#include <lib/subghz/subghz_worker.h> | ||
#include <lib/subghz/subghz_setting.h> | ||
#include <lib/subghz/receiver.h> | ||
#include <lib/subghz/transmitter.h> | ||
//#include <lib/subghz/blocks/custom_btn.h> | ||
|
||
#include <flipper_format/flipper_format_i.h> | ||
|
||
#include "subghz_types.h" | ||
|
||
extern const SubGhzProtocolRegistry subghz_protocol_registry; | ||
|
||
struct SubGhzTxRx { | ||
//SubGhzWorker* worker; | ||
|
||
SubGhzEnvironment* environment; | ||
SubGhzReceiver* receiver; | ||
//SubGhzTransmitter* transmitter; | ||
//SubGhzProtocolFlag filter; | ||
SubGhzProtocolDecoderBase* decoder_result; | ||
FlipperFormat* fff_data; | ||
|
||
SubGhzRadioPreset* preset; | ||
//SubGhzHistory* history; | ||
//uint16_t idx_menu_chosen; | ||
//SubGhzTxRxState txrx_state; | ||
//SubGhzHopperState hopper_state; | ||
//SubGhzSpeakerState speaker_state; | ||
//uint8_t hopper_timeout; | ||
//uint8_t hopper_idx_frequency; | ||
//SubGhzRxKeyState rx_key_state; | ||
|
||
//float raw_threshold_rssi; | ||
//uint8_t raw_threshold_rssi_low_count; | ||
}; | ||
|
||
typedef struct SubGhzTxRx SubGhzTxRx; |
79 changes: 79 additions & 0 deletions
79
applications/external/xremote/models/subghz/subghz_types.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#pragma once | ||
|
||
#include <furi.h> | ||
#include <furi_hal.h> | ||
|
||
/** 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; | ||
|
||
/** SubGhzSpeakerState state */ | ||
typedef enum { | ||
SubGhzSpeakerStateDisable, | ||
SubGhzSpeakerStateShutdown, | ||
SubGhzSpeakerStateEnable, | ||
} SubGhzSpeakerState; | ||
|
||
/** SubGhzRxKeyState state */ | ||
typedef enum { | ||
SubGhzRxKeyStateIDLE, | ||
SubGhzRxKeyStateNoSave, | ||
SubGhzRxKeyStateNeedSave, | ||
SubGhzRxKeyStateBack, | ||
SubGhzRxKeyStateStart, | ||
SubGhzRxKeyStateAddKey, | ||
SubGhzRxKeyStateExit, | ||
SubGhzRxKeyStateRAWLoad, | ||
SubGhzRxKeyStateRAWSave, | ||
} SubGhzRxKeyState; | ||
|
||
/** SubGhzLoadKeyState state */ | ||
typedef enum { | ||
SubGhzLoadKeyStateUnknown, | ||
SubGhzLoadKeyStateOK, | ||
SubGhzLoadKeyStateParseErr, | ||
SubGhzLoadKeyStateProtocolDescriptionErr, | ||
} SubGhzLoadKeyState; | ||
|
||
/** SubGhzLock */ | ||
typedef enum { | ||
SubGhzLockOff, | ||
SubGhzLockOn, | ||
} SubGhzLock; | ||
|
||
typedef enum { | ||
SubGhzViewIdMenu, | ||
SubGhzViewIdReceiver, | ||
SubGhzViewIdPopup, | ||
SubGhzViewIdTextInput, | ||
SubGhzViewIdWidget, | ||
SubGhzViewIdTransmitter, | ||
SubGhzViewIdVariableItemList, | ||
SubGhzViewIdFrequencyAnalyzer, | ||
SubGhzViewIdReadRAW, | ||
|
||
SubGhzViewIdStatic, | ||
SubGhzViewIdTestCarrier, | ||
SubGhzViewIdTestPacket, | ||
} SubGhzViewId; |
Oops, something went wrong.