diff --git a/armsrc/hitagS.c b/armsrc/hitagS.c index db219bcf2..d304cb6b3 100644 --- a/armsrc/hitagS.c +++ b/armsrc/hitagS.c @@ -635,7 +635,7 @@ static void hitagS_handle_reader_command(uint8_t *rx, const size_t rxlen, /* * Emulates a Hitag S Tag with the given data from the .hts file */ -void SimulateHitagSTag(bool tag_mem_supplied, uint8_t *data, bool ledcontrol) { +void SimulateHitagSTag(bool tag_mem_supplied, const uint8_t *data, bool ledcontrol) { StopTicks(); @@ -1052,7 +1052,7 @@ static size_t concatbits(uint8_t *dstbuf, size_t dstbufskip, const uint8_t *srcb return dstbufskip + srcbuflen; } -static int selectHitagS(hitag_function htf, hitag_data *htd, uint8_t *tx, size_t sizeoftx, uint8_t *rx, size_t sizeofrx, int t_wait, bool ledcontrol) { +static int selectHitagS(hitag_function htf, const hitag_data *htd, uint8_t *tx, size_t sizeoftx, uint8_t *rx, size_t sizeofrx, int t_wait, bool ledcontrol) { StopTicks(); FpgaDownloadAndGo(FPGA_BITSTREAM_LF); @@ -1263,7 +1263,7 @@ static int selectHitagS(hitag_function htf, hitag_data *htd, uint8_t *tx, size_t * If the key was given the password will be decrypted. * Reads every page of a hitag S transpoder. */ -void ReadHitagS(hitag_function htf, hitag_data *htd, bool ledcontrol) { +void ReadHitagS(hitag_function htf, const hitag_data *htd, bool ledcontrol) { uint8_t rx[HITAG_FRAME_LEN]; size_t rxlen = 0; @@ -1356,7 +1356,7 @@ void ReadHitagS(hitag_function htf, hitag_data *htd, bool ledcontrol) { * Authenticates to the Tag with the given Key or Challenge. * Writes the given 32Bit data into page_ */ -void WritePageHitagS(hitag_function htf, hitag_data *htd, int page, bool ledcontrol) { +void WritePageHitagS(hitag_function htf, const hitag_data *htd, int page, bool ledcontrol) { bool bSuccessful = false; //check for valid input @@ -1443,7 +1443,7 @@ write_end: * is not received correctly due to Antenna problems. This function * detects these challenges. */ -void Hitag_check_challenges(uint8_t *data, uint32_t datalen, bool ledcontrol) { +void Hitag_check_challenges(const uint8_t *data, uint32_t datalen, bool ledcontrol) { //check for valid input if (datalen < 8) { Dbprintf("Error, need chals"); diff --git a/armsrc/hitagS.h b/armsrc/hitagS.h index 49a4f358f..cbb87722f 100644 --- a/armsrc/hitagS.h +++ b/armsrc/hitagS.h @@ -25,8 +25,8 @@ #include "hitag.h" -void SimulateHitagSTag(bool tag_mem_supplied, uint8_t *data, bool ledcontrol); -void ReadHitagS(hitag_function htf, hitag_data *htd, bool ledcontrol); -void WritePageHitagS(hitag_function htf, hitag_data *htd, int page, bool ledcontrol); -void Hitag_check_challenges(uint8_t *data, uint32_t datalen, bool ledcontrol); +void SimulateHitagSTag(bool tag_mem_supplied, const uint8_t *data, bool ledcontrol); +void ReadHitagS(hitag_function htf, const hitag_data *htd, bool ledcontrol); +void WritePageHitagS(hitag_function htf, const hitag_data *htd, int page, bool ledcontrol); +void Hitag_check_challenges(const uint8_t *data, uint32_t datalen, bool ledcontrol); #endif