Host Communication Protocol  2.0
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;
47 
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;
71 
72 #ifdef __cplusplus
73 }
74 #endif /* __cplusplus */
75 
76 #endif /* FPC_COM_PACKETS_H */
struct fpc_com_packet_link fpc_com_packet_link_t
fpc_com_channel
struct fpc_com_packet_transport fpc_com_packet_tsp_t
uint16_t fpc_com_channel_t