mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
const
improvement for BigBuf.h
This commit is contained in:
parent
6df79e3926
commit
5e71621c69
2 changed files with 6 additions and 6 deletions
|
@ -233,7 +233,7 @@ uint32_t BigBuf_get_traceLen(void) {
|
||||||
by 'hf list -t raw', alternatively 'hf list -t <proto>' for protocol-specific
|
by 'hf list -t raw', alternatively 'hf list -t <proto>' for protocol-specific
|
||||||
annotation of commands/responses.
|
annotation of commands/responses.
|
||||||
**/
|
**/
|
||||||
bool RAMFUNC LogTrace(const uint8_t *btBytes, uint16_t iLen, uint32_t timestamp_start, uint32_t timestamp_end, uint8_t *parity, bool reader2tag) {
|
bool RAMFUNC LogTrace(const uint8_t *btBytes, uint16_t iLen, uint32_t timestamp_start, uint32_t timestamp_end, const uint8_t *parity, bool reader2tag) {
|
||||||
if (tracing == false) {
|
if (tracing == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ bool RAMFUNC LogTrace(const uint8_t *btBytes, uint16_t iLen, uint32_t timestamp_
|
||||||
}
|
}
|
||||||
|
|
||||||
// specific LogTrace function for ISO15693: the duration needs to be scaled because otherwise it won't fit into a uint16_t
|
// specific LogTrace function for ISO15693: the duration needs to be scaled because otherwise it won't fit into a uint16_t
|
||||||
bool LogTrace_ISO15693(const uint8_t *bytes, uint16_t len, uint32_t ts_start, uint32_t ts_end, uint8_t *parity, bool reader2tag) {
|
bool LogTrace_ISO15693(const uint8_t *bytes, uint16_t len, uint32_t ts_start, uint32_t ts_end, const uint8_t *parity, bool reader2tag) {
|
||||||
uint32_t duration = ts_end - ts_start;
|
uint32_t duration = ts_end - ts_start;
|
||||||
duration /= 32;
|
duration /= 32;
|
||||||
ts_end = ts_start + duration;
|
ts_end = ts_start + duration;
|
||||||
|
@ -306,7 +306,7 @@ bool RAMFUNC LogTraceBits(const uint8_t *btBytes, uint16_t bitLen, uint32_t time
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emulator memory
|
// Emulator memory
|
||||||
uint8_t emlSet(uint8_t *data, uint32_t offset, uint32_t length) {
|
uint8_t emlSet(const uint8_t *data, uint32_t offset, uint32_t length) {
|
||||||
uint8_t *mem = BigBuf_get_EM_addr();
|
uint8_t *mem = BigBuf_get_EM_addr();
|
||||||
if (offset + length <= CARD_MEMORY_SIZE) {
|
if (offset + length <= CARD_MEMORY_SIZE) {
|
||||||
memcpy(mem + offset, data, length);
|
memcpy(mem + offset, data, length);
|
||||||
|
|
|
@ -51,11 +51,11 @@ void set_tracing(bool enable);
|
||||||
void set_tracelen(uint32_t value);
|
void set_tracelen(uint32_t value);
|
||||||
bool get_tracing(void);
|
bool get_tracing(void);
|
||||||
|
|
||||||
bool RAMFUNC LogTrace(const uint8_t *btBytes, uint16_t iLen, uint32_t timestamp_start, uint32_t timestamp_end, uint8_t *parity, bool reader2tag);
|
bool RAMFUNC LogTrace(const uint8_t *btBytes, uint16_t iLen, uint32_t timestamp_start, uint32_t timestamp_end, const uint8_t *parity, bool reader2tag);
|
||||||
bool RAMFUNC LogTraceBits(const uint8_t *btBytes, uint16_t bitLen, uint32_t timestamp_start, uint32_t timestamp_end, bool reader2tag);
|
bool RAMFUNC LogTraceBits(const uint8_t *btBytes, uint16_t bitLen, uint32_t timestamp_start, uint32_t timestamp_end, bool reader2tag);
|
||||||
bool LogTrace_ISO15693(const uint8_t *bytes, uint16_t len, uint32_t ts_start, uint32_t ts_end, uint8_t *parity, bool reader2tag);
|
bool LogTrace_ISO15693(const uint8_t *bytes, uint16_t len, uint32_t ts_start, uint32_t ts_end, const uint8_t *parity, bool reader2tag);
|
||||||
|
|
||||||
uint8_t emlSet(uint8_t *data, uint32_t offset, uint32_t length);
|
uint8_t emlSet(const uint8_t *data, uint32_t offset, uint32_t length);
|
||||||
uint8_t emlGet(uint8_t *out, uint32_t offset, uint32_t length);
|
uint8_t emlGet(uint8_t *out, uint32_t offset, uint32_t length);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue