diff --git a/libfreefare/freefare.h b/libfreefare/freefare.h index 5083e21..23b66df 100644 --- a/libfreefare/freefare.h +++ b/libfreefare/freefare.h @@ -370,8 +370,8 @@ int mifare_desfire_delete_file (MifareTag tag, uint8_t file_no); ssize_t mifare_desfire_read_data (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data); ssize_t mifare_desfire_read_data_ex (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data, int cs); -ssize_t mifare_desfire_write_data (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data); -ssize_t mifare_desfire_write_data_ex (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data, int cs); +ssize_t mifare_desfire_write_data (MifareTag tag, uint8_t file_no, off_t offset, size_t length, const void *data); +ssize_t mifare_desfire_write_data_ex (MifareTag tag, uint8_t file_no, off_t offset, size_t length, const void *data, int cs); int mifare_desfire_get_value (MifareTag tag, uint8_t file_no, int32_t *value); int mifare_desfire_get_value_ex (MifareTag tag, uint8_t file_no, int32_t *value, int cs); int mifare_desfire_credit (MifareTag tag, uint8_t file_no, int32_t amount); diff --git a/libfreefare/mifare_desfire.c b/libfreefare/mifare_desfire.c index f4cc537..24c5df0 100644 --- a/libfreefare/mifare_desfire.c +++ b/libfreefare/mifare_desfire.c @@ -1626,13 +1626,13 @@ write_data (MifareTag tag, uint8_t command, uint8_t file_no, off_t offset, size_ } ssize_t -mifare_desfire_write_data (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data) +mifare_desfire_write_data (MifareTag tag, uint8_t file_no, off_t offset, size_t length, const void *data) { return mifare_desfire_write_data_ex (tag, file_no, offset, length, data, madame_soleil_get_write_communication_settings (tag, file_no)); } ssize_t -mifare_desfire_write_data_ex (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data, int cs) +mifare_desfire_write_data_ex (MifareTag tag, uint8_t file_no, off_t offset, size_t length, const void *data, int cs) { return write_data (tag, 0x3D, file_no, offset, length, data, cs); }