forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Protocol decoding, work in progress.
- Loading branch information
Showing
6 changed files
with
173 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "../app.h" | ||
|
||
static bool decode(uint8_t *bits, uint64_t numbits, ProtoViewMsgInfo *info) { | ||
const char *sync_pattern = "01100110" "01100110" "10010110" "10010110"; | ||
uint64_t off = bitmap_seek_bits(bits,numbits,0,sync_pattern); | ||
if (off == BITMAP_SEEK_NOT_FOUND) return false; | ||
|
||
FURI_LOG_E(TAG, "Oregon2 prelude+sync found"); | ||
snprintf(info->name,sizeof(info->name),"%s","Oregon v2.1"); | ||
return true; | ||
} | ||
|
||
ProtoViewDecoder Oregon2Decoder = { | ||
"Oregon2", decode | ||
}; |
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,6 @@ | ||
11001100110011001100110011001100110011001100110011001100110 (Preamble) | ||
10 01 01 10 10 01 01 10 (Sync) | ||
01 10 10 01 10 01 10 01 01 10 10 01 01 10 01 10 10 01 01 10 10 01 10 01 10 01 10 01 10 01 10 01 01 10 10 01 10 01 10 01 01 10 01 10 01 10 01 10 01 10 01 10 10 01 01 10 01 10 10 01 10 01 10 01 10 01 10 01 01 10 10 01 10 01 01 10 01 10 10 01 01 10 10 01 10 01 10 01 10 01 10 01 10 01 11 0 | ||
|
||
We need to seek the following bytes: 01100110 01100110 10010110 10010110 | ||
0x66 0x66 96 96 |
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