Intermec 5055 참조 가이드
im_transmit_byte
5-76
im_transmit_byte (continued)
#define SETTINGS (_COM_9600 | _COM_CHR7 | _COM_STOP1 | _COM_EVENPARITY )
static IM_COM_PORT com_port = IM_COM1; /* Uses COM1*/
void main (void)
{
IM_UCHAR outchar;
{
IM_UCHAR outchar;
IM_STATUS status;
im_cputs("\nChoose a protocol:\n", IM_NORMAL);
printf("1) PC Standard\n");
printf("2) No protocol\n");
printf("1) PC Standard\n");
printf("2) No protocol\n");
if (getche() == '2') /* Call bios to initialize com port */
{
/* Communications port init */
_bios_serialcom(_COM_INIT, COM1, SETTINGS);
}
{
/* Communications port init */
_bios_serialcom(_COM_INIT, COM1, SETTINGS);
}
/* Display instruction */
printf ("Enter characters\n");
printf (" to be transmitted\n");
printf (" <ESC> to quit\n");
printf ("Enter characters\n");
printf (" to be transmitted\n");
printf (" <ESC> to quit\n");
/* Phimec protocol handler must NOT be installed ...*/
while ((outchar = getche()) != '\x1B') /* Send char until <ESC> char*/
{
/* Call Intermec function */
status = im_transmit_byte( com_port, outchar);
if ( IM_ISERROR(status))
im_message(status);
}
}
while ((outchar = getche()) != '\x1B') /* Send char until <ESC> char*/
{
/* Call Intermec function */
status = im_transmit_byte( com_port, outchar);
if ( IM_ISERROR(status))
im_message(status);
}
}