forked from flipperdevices/flipperzero-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/release-candidate' into release
- Loading branch information
Showing
192 changed files
with
3,749 additions
and
1,076 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
|
||
#include <lib/nfc/protocols/mifare_classic.h> | ||
|
||
bool magic_gen1_wupa(); | ||
|
||
bool magic_gen1_read_block(uint8_t block_num, MfClassicBlock* data); | ||
|
||
bool magic_gen1_data_access_cmd(); | ||
|
||
bool magic_gen1_write_blk(uint8_t block_num, MfClassicBlock* data); |
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,33 @@ | ||
#include "common.h" | ||
|
||
#include <furi_hal_nfc.h> | ||
|
||
#define REQA (0x26) | ||
#define CL1_PREFIX (0x93) | ||
#define SELECT (0x70) | ||
|
||
#define MAGIC_BUFFER_SIZE (32) | ||
|
||
bool magic_activate() { | ||
FuriHalNfcReturn ret = 0; | ||
|
||
// Setup nfc poller | ||
furi_hal_nfc_exit_sleep(); | ||
furi_hal_nfc_ll_txrx_on(); | ||
furi_hal_nfc_ll_poll(); | ||
ret = furi_hal_nfc_ll_set_mode( | ||
FuriHalNfcModePollNfca, FuriHalNfcBitrate106, FuriHalNfcBitrate106); | ||
if(ret != FuriHalNfcReturnOk) return false; | ||
|
||
furi_hal_nfc_ll_set_fdt_listen(FURI_HAL_NFC_LL_FDT_LISTEN_NFCA_POLLER); | ||
furi_hal_nfc_ll_set_fdt_poll(FURI_HAL_NFC_LL_FDT_POLL_NFCA_POLLER); | ||
furi_hal_nfc_ll_set_error_handling(FuriHalNfcErrorHandlingNfc); | ||
furi_hal_nfc_ll_set_guard_time(FURI_HAL_NFC_LL_GT_NFCA); | ||
|
||
return true; | ||
} | ||
|
||
void magic_deactivate() { | ||
furi_hal_nfc_ll_txrx_off(); | ||
furi_hal_nfc_sleep(); | ||
} |
Oops, something went wrong.