-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from zinongli/stock_funcitons
Use Stock Functions to Achieve Directory and Flipper Format functions
- Loading branch information
Showing
3 changed files
with
76 additions
and
117 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
Filetype: Flipper T5577 Raw File | ||
Version: 1.0 | ||
Modulation: ASK/MC | ||
Version: 2 | ||
Modulation: FSK2a | ||
RF Clock: 64 | ||
Number of User Blocks: 8 | ||
|
||
Raw Data: | ||
Block 0: 00148100 | ||
Block 1: 1A2B3C4D | ||
Block 2: 5678ABCD | ||
Block 3: 12345678 | ||
Block 4: 87654321 | ||
Block 5: 12341234 | ||
Block 6: ABCDEFAB | ||
Block 7: 78901234 | ||
|
||
Raw Data: | ||
Block 0: 00 14 71 00 | ||
Block 1: 11 12 13 14 | ||
Block 2: 22 33 44 55 | ||
Block 3: 1A 2B 3C 4D | ||
Block 4: 56 78 AB CD | ||
Block 5: 12 34 12 34 | ||
Block 6: AB CD EF AB | ||
Block 7: 12 34 56 78 |
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 |
---|---|---|
@@ -1,3 +1,17 @@ | ||
#define T5577_WRITER_APPS_DATA_FOLDER EXT_PATH("apps_data") | ||
#define T5577_WRITER_FILE_FOLDER EXT_PATH("apps_data/t5577_writer") | ||
#define T5577_WRITER_FILE_EXTENSION ".t5577" | ||
#define T5577_WRITER_FILE_EXTENSION ".t5577" | ||
|
||
void uint32_to_byte_buffer(uint32_t block_data, uint8_t byte_buffer[4]) { | ||
byte_buffer[0] = (block_data >> 24) & 0xFF; | ||
byte_buffer[1] = (block_data >> 16) & 0xFF; | ||
byte_buffer[2] = (block_data >> 8) & 0xFF; | ||
byte_buffer[3] = block_data & 0xFF; | ||
} | ||
|
||
uint32_t byte_buffer_to_uint32(uint8_t byte_buffer[4]) { | ||
uint32_t block_data = 0; | ||
block_data |= ((uint32_t)byte_buffer[0] << 24); | ||
block_data |= ((uint32_t)byte_buffer[1] << 16); | ||
block_data |= ((uint32_t)byte_buffer[2] << 8); | ||
block_data |= ((uint32_t)byte_buffer[3]); | ||
return block_data; | ||
} |