192 const uint8_t *buffer,
194 uint8_t *tx_packet_buffer,
195 uint16_t tx_packet_buffer_size)
202 LOG_IO(
"Tx : INITIALIZATION PACKET\n");
208 memset(tx_packet_buffer, 0, tx_packet_buffer_size);
211 LOG_IO(
"Tx : CONTINUATION PACKET\n");
214 uint16_t tx_packet_offset = 0;
215 memset(tx_packet_buffer, 0, tx_packet_buffer_size);
219 U4BE_ENCODE(tx_packet_buffer, 0, handle->
tx_cid);
220 tx_packet_offset += 4;
225 tx_packet_buffer[tx_packet_offset++] = cmd | 0x80;
226 U2BE_ENCODE(tx_packet_buffer, tx_packet_offset, length);
227 tx_packet_offset += 2;
236 memcpy(&tx_packet_buffer[tx_packet_offset],
238 tx_packet_buffer_size - tx_packet_offset);
240 tx_packet_offset = tx_packet_buffer_size;
244 memcpy(&tx_packet_buffer[tx_packet_offset],
void U2F_TRANSPORT_tx(u2f_transport_t *handle, uint8_t cmd, const uint8_t *buffer, uint16_t length, uint8_t *tx_packet_buffer, uint16_t tx_packet_buffer_size)