mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
unified static dma buffer as bigbuf_malloc, less pressure on stack size
This commit is contained in:
parent
85be784d26
commit
3354f0d9d3
5 changed files with 194 additions and 175 deletions
|
@ -19,7 +19,7 @@
|
|||
#define MAX_MIFARE_FRAME_SIZE 18 // biggest Mifare frame is answer to a read (one block = 16 Bytes) + 2 Bytes CRC
|
||||
#define MAX_MIFARE_PARITY_SIZE 3 // need 18 parity bits for the 18 Byte above. 3 Bytes are enough to store these
|
||||
#define CARD_MEMORY_SIZE 4096
|
||||
#define DMA_BUFFER_SIZE 128
|
||||
#define DMA_BUFFER_SIZE 256
|
||||
|
||||
// 8 data bits and 1 parity bit per payload byte, 1 correction bit, 1 SOC bit, 2 EOC bits
|
||||
#define TOSEND_BUFFER_SIZE (9 * MAX_FRAME_SIZE + 1 + 1 + 2)
|
||||
|
@ -56,4 +56,16 @@ tosend_t *get_tosend(void);
|
|||
void tosend_reset(void);
|
||||
void tosend_stuffbit(int b);
|
||||
|
||||
typedef struct {
|
||||
uint16_t size;
|
||||
uint8_t *buf;
|
||||
} dmabuf8_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t size;
|
||||
uint16_t *buf;
|
||||
} dmabuf16_t;
|
||||
|
||||
dmabuf8_t *get_dma8(void);
|
||||
dmabuf16_t *get_dma16(void);
|
||||
#endif /* __BIGBUF_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue