fpc_com_packets.h
Go to the documentation of this file.
/*
* Copyright (c) 2020 Fingerprint Cards AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FPC_COM_PACKETS_H
#define FPC_COM_PACKETS_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define FPC_COM_ACK 0x7f01ff7f
typedef struct fpc_com_packet_transport {
uint16_t size;
uint16_t seq_len;
uint16_t seq_nr;
uint8_t *data;
} fpc_com_packet_tsp_t;
enum fpc_com_channel {
FPC_COM_CHANNEL_NONE = 0x00,
FPC_COM_CHANNEL_CLEAR = 0x01,
FPC_COM_CHANNEL_TLS = 0x02,
FPC_COM_CHANNEL_END = 0xFF,
};
typedef uint16_t fpc_com_channel_t;
typedef struct fpc_com_packet_link {
fpc_com_channel_t channel;
uint16_t size;
uint8_t *data;
uint32_t crc;
} fpc_com_packet_link_t;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#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