PutCom

Availability All terminals
Description PutCom() transmits a character through the serial communications port that was last opened by ComOpen().
Syntax int PutCom( unsigned char c );
Arguments
unsigned char c
c is the character that is to be transmitted.
Returns OK or ERROR.
Remarks - When no port is currently open, ERROR will be returned.
- Note that on the default port (COM9) is automatically opened at startup.
Example
#include <stdio.h>
#include "lib.h"

void main( void )
{
    int ch;

    ComOpen( COM9 );    // Open the COM port for USB-VCP

    for(;;)
    {
        if( (ch = GetCom( 0 )) != -1)
        {
            PutCom( ch );
        }
        Idle();    // Very important to lower the power consumption
    }
}