18 struct PACKET_BODY_tag
22 #ifndef FPGA_TRACE_DOWNLOAD
23 unsigned char content[ MAX_PKT_SIZE ];
29 typedef struct PACKET_tag
31 struct PACKET_tag *next;
33 int pkt_state; // used by recv handle, see pkt_flag_s
36 struct PACKET_BODY_tag packet_body;
38 struct PACKET_BODY_tag
42 unsigned char content[ MAX_PKT_SIZE ];
47 #define PACKET_HEADER_SIZE 4 // (type + size)
50 void FDL_PacketInit (void);
52 PACKET_T *FDL_MallocPacket (void);
54 void FDL_FreePacket (PACKET_T *ptr);
56 // Receive a packet, after handle it, should call FDL_FreePacket to release it.
57 PACKET_T *FDL_GetPacket (void);
60 // This function be called when system is in idle to process the input char.
62 void FDL_PacketDoIdle (void);
65 void FDL_SendPacket (PACKET_T *packet_ptr);
67 void FDL_SendAckPacket (cmd_pkt_type pkt_type);
69 extern struct FDL_ChannelHandler *gFdlUsedChannel;