Host Communication Protocol
2.0
Main Page
Related Pages
Data Structures
Files
File List
Globals
fpc_com_packets.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 Fingerprint Cards AB
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
* https://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
22
#ifndef FPC_COM_PACKETS_H
23
#define FPC_COM_PACKETS_H
24
25
#include <stdint.h>
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
/* __cplusplus */
30
32
#define FPC_COM_ACK 0x7f01ff7f
33
37
typedef
struct
fpc_com_packet_transport
{
39
uint16_t
size
;
41
uint16_t
seq_len
;
43
uint16_t
seq_nr
;
45
uint8_t *
data
;
46
}
fpc_com_packet_tsp_t
;
47
51
enum
fpc_com_channel
{
52
FPC_COM_CHANNEL_NONE
= 0x00,
53
FPC_COM_CHANNEL_CLEAR
= 0x01,
54
FPC_COM_CHANNEL_TLS
= 0x02,
55
FPC_COM_CHANNEL_END
= 0xFF,
56
};
58
typedef
uint16_t
fpc_com_channel_t
;
59
61
typedef
struct
fpc_com_packet_link
{
63
fpc_com_channel_t
channel
;
65
uint16_t
size
;
67
uint8_t *
data
;
69
uint32_t
crc
;
70
}
fpc_com_packet_link_t
;
71
72
#ifdef __cplusplus
73
}
74
#endif
/* __cplusplus */
75
76
#endif
/* FPC_COM_PACKETS_H */
FPC_COM_CHANNEL_CLEAR
Definition:
fpc_com_packets.h:53
fpc_com_packet_link_t
struct fpc_com_packet_link fpc_com_packet_link_t
fpc_com_channel
fpc_com_channel
Definition:
fpc_com_packets.h:51
fpc_com_packet_transport::data
uint8_t * data
Definition:
fpc_com_packets.h:45
FPC_COM_CHANNEL_NONE
Definition:
fpc_com_packets.h:52
fpc_com_packet_link::size
uint16_t size
Definition:
fpc_com_packets.h:65
fpc_com_packet_transport
Definition:
fpc_com_packets.h:37
FPC_COM_CHANNEL_TLS
Definition:
fpc_com_packets.h:54
fpc_com_packet_link::data
uint8_t * data
Definition:
fpc_com_packets.h:67
fpc_com_packet_tsp_t
struct fpc_com_packet_transport fpc_com_packet_tsp_t
FPC_COM_CHANNEL_END
Definition:
fpc_com_packets.h:55
fpc_com_packet_link::channel
fpc_com_channel_t channel
Definition:
fpc_com_packets.h:63
fpc_com_packet_transport::seq_len
uint16_t seq_len
Definition:
fpc_com_packets.h:41
fpc_com_packet_link::crc
uint32_t crc
Definition:
fpc_com_packets.h:69
fpc_com_channel_t
uint16_t fpc_com_channel_t
Definition:
fpc_com_packets.h:58
fpc_com_packet_transport::seq_nr
uint16_t seq_nr
Definition:
fpc_com_packets.h:43
fpc_com_packet_transport::size
uint16_t size
Definition:
fpc_com_packets.h:39
fpc_com_packet_link
Definition:
fpc_com_packets.h:61
inc
fpc_com_packets.h
Generated on Mon Jun 7 2021 08:40:50 for Host Communication Protocol by
1.8.11