beautypg.com

KEPCO BIT 232F User Manual

Page 68

background image

F-4

BIT 232 022800

F.8

SEND COMMAND AND WAIT UNTIL READY

This function uses the SendCommand function to send commands to the BIT Card and display
echoed characters and response messages on the screen until the > character is received,
indicating that parsing and execution of the command has been completed.

void SendCmmdWready(char *send_cmmd)

{

int not_endcmd;

char recv, *st_buff;

not_endcmd = TRUE;

st_buff = send_cmmd;

SendCommand(send_cmmd);

send_cmmd =st_buff;

while(not_endcmd)

{

if (in_ready(PORT)) {

/* get character from serial port*/

recv = get_serc(PORT);

/* display it if one was available */

if (recv != EOF)

{

putch(recv);

*send_cmmd = recv;

send_cmmd ++;

if (recv == ‘>’)

not_endcmd = FALSE;

}

}

}

*send_cmmd = ‘\0’;

}

This manual is related to the following products: