Refactoring of BigBuf handling in order to prepare for more efficient memory allocation and longer traces.

This commit is contained in:
pwpiwi 2015-01-16 11:00:17 +01:00
commit 117d9ec25c
14 changed files with 251 additions and 164 deletions

View file

@ -23,13 +23,13 @@ int MF_DBGLEVEL = MF_DBG_ALL;
// memory management
uint8_t* get_bigbufptr_recvrespbuf(void) {
return (((uint8_t *)BigBuf) + RECV_RESP_OFFSET);
return BigBuf_get_addr() + RECV_RESP_OFFSET;
}
uint8_t* get_bigbufptr_recvcmdbuf(void) {
return (((uint8_t *)BigBuf) + RECV_CMD_OFFSET);
return BigBuf_get_addr() + RECV_CMD_OFFSET;
}
uint8_t* get_bigbufptr_emlcardmem(void) {
return (((uint8_t *)BigBuf) + CARD_MEMORY_OFFSET);
return BigBuf_get_addr() + CARD_MEMORY_OFFSET;
}
// crypto1 helpers
@ -717,4 +717,4 @@ int mifare_desfire_des_auth2(uint32_t uid, uint8_t *key, uint8_t *blockData){
return 0;
}
return 1;
}
}