@@ -346,24 +346,24 @@ void mag_spoof_bitwise(Mag* mag) {
346
346
uint8_t byte = i / 8 ;
347
347
uint8_t bitmask = 1 << (7 - (i % 8 ));
348
348
/* this comment is mostly for zw's convenience:
349
- *
350
- * bits are stored in their arrays like on a card (LSB first). This is not how usually bits are stored in a
351
- * byte, with the MSB first. the var bitmask creates the pattern to iterate through each bit, LSB first, like so
352
- * 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x80... masking bits one by one from the current byte
353
- *
354
- * i've chosen this LSB approach since bits and bytes are hard enough to visualize with the 5/8 and 7/8 encoding
355
- * MSR uses. It's a biiit more complicated to process, but visualizing it with printf or a debugger is
356
- * infinitely easier
357
- *
358
- * Encoding the following pairs of 5 bits as 5/8: A1234 B1234 C1234 D1234
359
- * using this LSB format looks like: A1234B12 34C1234D 12340000
360
- * using the MSB format, looks like: 21B4321A D4321C43 00004321
361
- * this means reading each byte backwards when printing/debugging, and the jumping 16 bits ahead, reading 8 more
362
- * bits backward, jumping 16 more bits ahead.
363
- *
364
- * I find this much more convenient for debugging, with the tiny incovenience of reading the bits in reverse
365
- * order. THus, the reason for the bitmask above
366
- */
349
+ *
350
+ * bits are stored in their arrays like on a card (LSB first). This is not how usually bits are stored in a
351
+ * byte, with the MSB first. the var bitmask creates the pattern to iterate through each bit, LSB first, like so
352
+ * 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x80... masking bits one by one from the current byte
353
+ *
354
+ * i've chosen this LSB approach since bits and bytes are hard enough to visualize with the 5/8 and 7/8 encoding
355
+ * MSR uses. It's a biiit more complicated to process, but visualizing it with printf or a debugger is
356
+ * infinitely easier
357
+ *
358
+ * Encoding the following pairs of 5 bits as 5/8: A1234 B1234 C1234 D1234
359
+ * using this LSB format looks like: A1234B12 34C1234D 12340000
360
+ * using the MSB format, looks like: 21B4321A D4321C43 00004321
361
+ * this means reading each byte backwards when printing/debugging, and the jumping 16 bits ahead, reading 8 more
362
+ * bits backward, jumping 16 more bits ahead.
363
+ *
364
+ * I find this much more convenient for debugging, with the tiny incovenience of reading the bits in reverse
365
+ * order. THus, the reason for the bitmask above
366
+ */
367
367
368
368
bit = !!(bits_t1_manchester [byte ] & bitmask );
369
369
@@ -404,7 +404,7 @@ void mag_spoof_bitwise(Mag* mag) {
404
404
FURI_CRITICAL_EXIT ();
405
405
free (data1 );
406
406
free (data2 );
407
- tx_reset (setting );
407
+ tx_deinit (setting );
408
408
}
409
409
410
410
// due for deprecation
@@ -460,7 +460,7 @@ void mag_spoof(Mag* mag) {
460
460
FURI_CRITICAL_EXIT ();
461
461
462
462
// Reset configured TX method
463
- if (!tx_reset (setting )) break ;
463
+ if (!tx_deinit (setting )) break ;
464
464
spoofed = true;
465
465
} while (0 );
466
466
0 commit comments