6.0 Basic Operation
CN8478/CN8474A/CN8472A/CN8471A
6.3 Channel Operation
Multichannel Synchronous Communications Controller (MUSYCC™)
The following describes a general sequence for setting up the transmit
Message Descriptor for a single channel:
/* assume transmit channel is currently deactivated */
/* assume that a 1024-byte message is separated into four 256-byte data buffers
*/
/* Because four buffers will be used, four 12-byte segments [or one 48-byte */
/* of shared memory is required */
/* declare structures */
typedef tDATA_BUFFER
{
unsigned char Data[256];
} DATA_BUFFER;
typedef tMSG_DESCR
{
unsigned long BufferDescr;
struct DATA_BUFFER *pDataBuffer;
struct MSG_DESCR *pNextMsgDescr;
} MSG_DESCR;
/* allocate space */
MSG_DESCR *pTxMsgDescr[4];
DATA_BUFFER *pDataBuf[4];
/* link the message descriptors together. Terminate the message list by */
/* assigning the “next” pointer in the last descriptor to point to the last */
/* descriptor itself */
pTxMsgDescr[0]->pNextMsgDescr = pTxMsgDescr[1];
pTxMsgDescr[1]->pNextMsgDescr = pTxMsgDescr[2];
pTxMsgDescr[2]->pNextMsgDescr = pTxMsgDescr[3];
pTxMsgDescr[3]->pNextMsgDescr = pTxMsgDescr[0];
/* Note: last descriptor points to itself */
/* assign each message descriptor a data buffer */
pTxMsgDescr[0]->pDataBuffer[0] = pDataBuf[0];
pTxMsgDescr[1]->pDataBuffer[1] = pDataBuf[1];
pTxMsgDescr[2]->pDataBuffer[2] = pDataBuf[2];
pTxMsgDescr[3]->pDataBuffer[3] = pDataBuf[3];
/* set the value for each buffer descriptor in each message descriptor */
/* OWNER bit to MUSYCC, for tx buffers set to 1, for rx set to 0 */
/* NP bit to enable polling, set to 0 */
/* EOM bit if the last data buffer is associated with this descriptor */
/* EOBI bit to enable end-of-buffer interrupt, set to 1 */
/* IC field to set the idle-code to 7Eh, set to 0 */
/* PADEN field to disable pad fill, set to 0 */
/* PADCNT field to specify 0 pad fill codes, set to 0 */
/* REPEAT bit to disable message retransmission, set to 0 */
/* BLEN field set to the length of the data buffer, set to 256 */
/* msg descr 0 */
pTxMsgDescr[0]->BufferDescr = 0x90000200;
/* msg descr 1 */
6-20
Conexant
100660E