put MifareSectorNumber type in a new mifare_common.h header.
API changed: mifare_classic_format_sector() now takes a MifareSectorNumber in argument.
This commit is contained in:
parent
4bf33cc707
commit
a5dd66f77d
6 changed files with 37 additions and 8 deletions
|
|
@ -655,9 +655,9 @@ mifare_classic_get_data_block_permission (MifareClassicTag tag, const MifareClas
|
|||
* Reset a MIFARE target sector to factory default.
|
||||
*/
|
||||
int
|
||||
mifare_classic_format_sector (MifareClassicTag tag, const MifareClassicBlockNumber block)
|
||||
mifare_classic_format_sector (MifareClassicTag tag, const MifareSectorNumber sector)
|
||||
{
|
||||
MifareClassicBlockNumber first_sector_block = (block / 4) * 4;
|
||||
MifareClassicBlockNumber first_sector_block = sector * 4;
|
||||
/*
|
||||
* Check that the current key allow us to rewrite data and trailer blocks.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue