Help: ICE_ICELIB_PIC_SEND

Send a packet to a port/processor module

Function PIC_SEND - Send a packet to a port/processor module

PIC	p	Handle to Device 
int	node	Port/Processor Module node ID (-1=useDefault)
int	*head	Pointer to packet header for RMIF packets
int	*data	Pointer to packet data 
int	bytes	Number of bytes to write 
int	flags   0=Normal, PKT_RMIF for RMIF packets, PKT_ACMD for command packets

Sends a packet to a processor module input socket.
If flags indicate there is a packet header involved (i.e. PKT_RMIF), the
packet header is read from *head.  The <bytes> parameter does not include 
the header length.  Both the RMIF and ACMD headers are 8 bytes.

The ACMD header consists of two int_4 words.  The first is the command type,
PKTF_BUS_WR, or PKTF_MEM_WR, etc.  The second is the address.  The data is in *data, 
and the number of bytes of data to send is <bytes>.  For PKTF_BUS_RD and PKTF_MEM_RD,
the size to read is ORed in with the command type.  It must be less than 64K.

The supported packet ACMD functions are:

  PKTF_BUS_RD  
  PKTF_BUS_WR
  PKTF_MEM_RD
  PKTF_MEM_WR
  PKTF_MEM_TEST  for internal bootup 
  PKTF_INIT      not used yet
  PKTF_MODIFY    data[] is the argument to modifyAlgorithm(), usually an array of integers
  PKTF_RUN       head[1] is 1-toStart or 0-toStop
  PKTF_RESET     not used yet

All packet transfers are rounded up to 8-byte boundaries.  Make sure the
data buffer supports a read through the last 8-byte aligned field.  This
is to avoid extra memory copies in support of high-speed transfers.

See PIC_MSG for node IDs.

Returns the number of bytes sent.