CONTROLINK86 SMSC, CONTROLINK86 Datasheet - Page 64

no-image

CONTROLINK86

Manufacturer Part Number
CONTROLINK86
Description
Development Software Embedded Networking Software
Manufacturer
SMSC
Datasheet

Specifications of CONTROLINK86

Tool Function
Compiler
Tool Type
Compiler
Processor Series
80x86
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
ControLink86 Realtime Networking Software
/****************************************************************************
void net_init(void)
* FUNCTION NAME: net_init
*
* DESCRIPTION : initializes the network
*
* RETURN VALUE : none
***************************************************************************/
fflush(stdin);
sscanf(&dummy[0], "%d", &ssapidx);
/* adjust ssapidx for the index to the arrays */
if(ssapidx == 0)
else
/* get the sap to send from */
printf("Enter the SAP number to send the to: ");
gets(&dummy[0]);
fflush(stdin);
sscanf(&dummy[0], "%d", &dsapidx);
/* check if continual sending */
printf("Enter:\n");
printf("
printf("
printf("\n");
gets(&dummy[0]);
fflush(stdin);
scanf(&dummy[0], "%d", &once_many);
if((dummy[0] == 'o') || (dummy[0] == 'O'))
else if((dummy[0] == 'c') || (dummy[0] == 'C'))
else
return(status);
} /* end of send_pkt(..) */
{
unsigned char init_status;
{
printf("SAP 0 is reserved - use another!\n");
return(E_NOT_OK);
}
{
ssapidx--;
}
{
/* data request */
SAP[ssapidx].dstation = (USIGN8)destination_node;
SAP[ssapidx].msbcount = (USIGN8)((sizeof_sb[ssapidx] & 0xFF00) >> 8);
SAP[ssapidx].lsbcount = (USIGN8)(sizeof_sb[ssapidx] & 0x00FF);
SAP[ssapidx].msgptr = &SAPBUF[ssapidx][0];
status = llc1_request((USIGN8)(ssapidx + 1), dsapidx, DATA_REQUEST, &SAP[ssapidx]);
}
{
while(TRUE)
}
{
printf("\n\nInvalid selection!\n");
return(E_NOT_OK);
}
{
SAP[ssapidx].dstation = (USIGN8)destination_node;
SAP[ssapidx].msbcount = (USIGN8)((sizeof_sb[ssapidx] & 0xFF00) >> 8);
SAP[ssapidx].lsbcount = (USIGN8)(sizeof_sb[ssapidx] & 0x00FF);
SAP[ssapidx].msgptr = &SAPBUF[ssapidx][0];
status = llc1_request((USIGN8)(ssapidx + 1), dsapidx, DATA_REQUEST, &SAP[ssapidx]);
/* if keyboard hit - return */
if(kbhit())
}
<o> to transmit once\n");
<c> to transmit continually\n");
{
return(status);
}
64

Related parts for CONTROLINK86