Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
u2f_transport.h
Go to the documentation of this file.
1/*****************************************************************************
2 * (c) 2025 Ledger SAS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
17#pragma once
18
19/* Includes ------------------------------------------------------------------*/
20#include <stdint.h>
21#include "u2f_types.h"
22
23/* Exported enumerations -----------------------------------------------------*/
28
29/* Exported types, structures, unions ----------------------------------------*/
53
54/* Exported defines --------------------------------------------------------*/
55#define U2F_FORBIDDEN_CID (0x00000000)
56#define U2F_BROADCAST_CID (0xFFFFFFFF)
57
58/* Exported macros------------------------------------------------------------*/
59
60/* Exported variables --------------------------------------------------------*/
61
62/* Exported functions prototypes--------------------------------------------- */
63void U2F_TRANSPORT_init(u2f_transport_t *handle, uint8_t type);
64void U2F_TRANSPORT_rx(u2f_transport_t *handle, uint8_t *buffer, uint16_t length);
66 uint8_t cmd,
67 const uint8_t *buffer,
68 uint16_t length,
69 uint8_t *tx_packer_buffer,
70 uint16_t tx_packet_buffer_size);
uint16_t rx_message_buffer_size
uint8_t * rx_message_buffer
uint16_t rx_message_length
uint16_t rx_message_expected_sequence_number
uint16_t tx_message_sequence_number
uint16_t tx_message_offset
u2f_transport_type_t type
uint16_t tx_message_length
uint16_t rx_message_offset
const uint8_t * tx_message_buffer
u2f_error_t error
uint8_t tx_packet_length
u2f_transport_type_t
@ U2F_TRANSPORT_TYPE_BLE
@ U2F_TRANSPORT_TYPE_USB_HID
void U2F_TRANSPORT_init(u2f_transport_t *handle, uint8_t type)
void U2F_TRANSPORT_rx(u2f_transport_t *handle, uint8_t *buffer, uint16_t length)
void U2F_TRANSPORT_tx(u2f_transport_t *handle, uint8_t cmd, const uint8_t *buffer, uint16_t length, uint8_t *tx_packer_buffer, uint16_t tx_packet_buffer_size)
u2f_error_t
Definition u2f_types.h:63