Example #1
0
/* write s_out to edip_COM */
BYTE small_write(BYTE len)
{
	COM_flush(edip_COM);
	COM_write(edip_COM, s_edip_out, len);
	/*wait for ACK*/
	return ack==ACK && time < small_timeout
}
Example #2
0
/* Routine to send a string of bits and get another string back */
static GOOD_OR_BAD DS9097_send_and_get(const BYTE * bussend, BYTE * busget, const size_t length, struct connection_in * in)
{
	switch( in->pown->type ) {
		case ct_telnet:
			RETURN_BAD_IF_BAD( telnet_write_binary( bussend, length, in) ) ;
			break ;
		case ct_serial:
		default:
			RETURN_BAD_IF_BAD( COM_write( bussend, length, in ) ) ;
			break ;
	}

	/* get back string -- with timeout and partial read loop */
	return COM_read( busget, length, in ) ;
}
Example #3
0
// Write a string to the serial port
// return 0=good,
//          -EIO = error
//Special processing for the remote hub (add 0x0A)
static GOOD_OR_BAD LINK_write(const BYTE * buf, size_t size, struct connection_in *in)
{
	return COM_write( buf, size, in ) ;
}