Example #1
0
void main()
  {
    unsigned short status;

    status = _bios_serialcom( _COM_STATUS, 1, 0 );
    printf( "Serial status: 0x%2.2X\n", status );
  }
Example #2
0
static unsigned int
serialBiosCommand (SerialDevice *serial, int command, unsigned char data) {
  return _bios_serialcom(command, serialGetPort(serial), data);
}
Example #3
0
#include <bios.h>
  unsigned temp;
    // Open serial port at 1200 baud, 8 data bits,
    //  No parity, 1 stop bit
  temp = _bios_serialcom(_COM_INIT, 0,
              _COM_CHR8 | _COM_NOPARITY | _COM_STOP1 | _COM_1200);
  temp = _bios_serialcom(_COM_RECEIVE, 0,  0);   // Read a character
  temp = _bios_serialcom(_COM_SEND   , 0, '*');  // Write a character