ufbt format

This commit is contained in:
Eric Betts
2026-03-07 12:47:04 -08:00
parent 5789b21ca0
commit 810f143242
2 changed files with 7 additions and 8 deletions

12
ccid.h
View File

@@ -22,12 +22,12 @@
*/
// TODO: rename/renumber
#define CCID_SLOT_0_MASK 0x03
#define CCID_SLOT_0_CARD_OUT 0x02
#define CCID_SLOT_0_CARD_IN 0x03
#define CCID_SLOT_1_MASK 0x0C
#define CCID_SLOT_1_CARD_IN 0x04
#define CCID_SLOT_1_CARD_OUT 0x0C
#define CCID_SLOT_0_MASK 0x03
#define CCID_SLOT_0_CARD_OUT 0x02
#define CCID_SLOT_0_CARD_IN 0x03
#define CCID_SLOT_1_MASK 0x0C
#define CCID_SLOT_1_CARD_IN 0x04
#define CCID_SLOT_1_CARD_OUT 0x0C
/*
* * BULK_OUT messages from PC to Reader

3
t_1.c
View File

@@ -145,8 +145,7 @@ void seader_send_t1(SeaderUartBridge* seader_uart, uint8_t* apdu, size_t len) {
t1->tx_buffer = bit_buffer_alloc(768);
bit_buffer_copy_bytes(t1->tx_buffer, apdu, len);
}
size_t remaining =
(bit_buffer_get_size_bytes(t1->tx_buffer) - t1->tx_buffer_offset);
size_t remaining = (bit_buffer_get_size_bytes(t1->tx_buffer) - t1->tx_buffer_offset);
size_t copy_length = remaining > ifsc ? ifsc : remaining;
uint8_t* chunk = (uint8_t*)bit_buffer_get_data(t1->tx_buffer) + t1->tx_buffer_offset;