Host Communication Protocol
2.0
|
Communication link interface. More...
Go to the source code of this file.
Functions | |
fpc_com_result_t | fpc_com_link_transmit (fpc_com_packet_link_t *packet, fpc_com_chain_t *chain) |
Sends a packet over the physical link in blocking mode. More... | |
fpc_com_result_t | fpc_com_link_receive (fpc_com_packet_link_t *packet, fpc_com_chain_t *chain) |
Receives a packet from the physical link. More... | |
uint16_t | fpc_com_link_get_overhead (uint16_t *offset) |
Returns the overhead of the layer. More... | |
Communication link interface.
Definition in file fpc_com_link.h.
uint16_t fpc_com_link_get_overhead | ( | uint16_t * | offset | ) |
Returns the overhead of the layer.
[out] | offset | The offset to the packet data. |
Definition at line 126 of file fpc_com_link.c.
References fpc_com_packet_link::channel, fpc_com_packet_link::crc, and fpc_com_packet_link::size.
fpc_com_result_t fpc_com_link_receive | ( | fpc_com_packet_link_t * | packet, |
fpc_com_chain_t * | chain | ||
) |
Receives a packet from the physical link.
[in,out] | packet | Packet to populate. |
[in] | chain | The communication chain to use. |
Definition at line 73 of file fpc_com_link.c.
References fpc_com_packet_link::channel, fpc_com_packet_link::crc, fpc_com_chain::crc_calc, fpc_com_packet_link::data, FPC_COM_ACK, FPC_COM_CHAIN_RX, FPC_COM_RESULT_INVALID_ARGUMENT, FPC_COM_RESULT_IO_ERROR, FPC_COM_RESULT_OK, fpc_com_chain::phy_mtu_buffer, fpc_com_chain::phy_mtu_size, fpc_com_chain::phy_rx, fpc_com_chain::phy_timeout_rx, fpc_com_chain::phy_timeout_tx, fpc_com_chain::phy_tx, fpc_com_chain::session, and fpc_com_packet_link::size.
fpc_com_result_t fpc_com_link_transmit | ( | fpc_com_packet_link_t * | packet, |
fpc_com_chain_t * | chain | ||
) |
Sends a packet over the physical link in blocking mode.
[in] | packet | Packet to transmit. |
[in] | chain | The communication chain to use. |
Definition at line 27 of file fpc_com_link.c.
References fpc_com_packet_link::channel, fpc_com_packet_link::crc, fpc_com_chain::crc_calc, fpc_com_packet_link::data, FPC_COM_ACK, FPC_COM_CHAIN_TX, fpc_com_link_get_overhead(), FPC_COM_RESULT_INVALID_ARGUMENT, FPC_COM_RESULT_IO_ERROR, FPC_COM_RESULT_OK, FPC_COM_RESULT_TIMEOUT, fpc_com_chain::phy_mtu_buffer, fpc_com_chain::phy_rx, fpc_com_chain::phy_timeout_rx, fpc_com_chain::phy_timeout_tx, fpc_com_chain::phy_tx, fpc_com_chain::session, and fpc_com_packet_link::size.