mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
hitag signal refactoring
This commit is contained in:
parent
d956e8c2a3
commit
89bae75c55
7 changed files with 523 additions and 340 deletions
|
@ -106,17 +106,23 @@ sampling_t samples = {0, 0, 0, 0};
|
|||
|
||||
void initSampleBuffer(uint32_t *sample_size) {
|
||||
|
||||
BigBuf_free();
|
||||
BigBuf_Clear_ext(false);
|
||||
|
||||
if (sample_size == NULL || *sample_size == 0) {
|
||||
*sample_size = BigBuf_max_traceLen();
|
||||
|
||||
data.buffer = BigBuf_get_addr();
|
||||
|
||||
memset(data.buffer, 0, *sample_size);
|
||||
} else {
|
||||
*sample_size = MIN(*sample_size, BigBuf_max_traceLen());
|
||||
|
||||
data.buffer = BigBuf_malloc(*sample_size);
|
||||
|
||||
memset(data.buffer, 0, *sample_size);
|
||||
}
|
||||
|
||||
// use a bitstream to handle the output
|
||||
data.buffer = BigBuf_get_addr();
|
||||
|
||||
memset(data.buffer, 0, *sample_size);
|
||||
|
||||
//
|
||||
samples.dec_counter = 0;
|
||||
samples.sum = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue