Example #1
0
File: serial.c Project: kllk2320/os
/**
 *  Checks whether the transmit FIFO queue is empty or not for the given COM port
 *
 *  @return 0 if the transmit FIFO queue is not empty
 *          1 if the transmit FIFO queue is empty
 */
int serial_is_transmit_empty(unsigned short com)
{
    /* 0x20 = 0010 0000 */
    return inb(SERIAL_LINE_STATUS_PORT(com)) & 0x20;
}
Example #2
0
File: serial.c Project: kllk2320/os
int serial_is_received(unsigned short com)
{
	/* 0x01 = 0000 0001*/
	return inb(SERIAL_LINE_STATUS_PORT(com)) & 0x01;
}
Example #3
0
/** serial_is_transmit_fifo_empty:
 *  Checks whether the transmit FIFO queue is empty or not for the given COM
 *  port.
 *
 *  @param  com The COM port
 *  @return 0 if the transmit FIFO queue is not empty
 *          1 if the transmit FIFO queue is empty
 */
int serial_is_transmit_fifo_empty(unsigned int com){
  /* 0x20 = 0010 0000 */ //The transmit fifo queue bit
  return inb(SERIAL_LINE_STATUS_PORT(com)) & 0x20;
}
Example #4
0
/** serial_received:
 * returns true if data is waiting in the serial port
 * Waiting to be read. 
 */
int serial_received(unsigned short com){
  return inb(SERIAL_LINE_STATUS_PORT(com)) & 1;
}
Example #5
0
unsigned char
serial_is_tx_fifo_empty(unsigned short com)
{
	/* bit 5 of line status register indicates if queue is empty */
	return inb(SERIAL_LINE_STATUS_PORT(com)) & 0x20;
}
Example #6
0
int serial_is_transmit_fifo_empty(uint16_t com){
    //0x20 = 0010 0000
    return inb(SERIAL_LINE_STATUS_PORT(com)) & 0x20;
}
Example #7
0
int serial_is_transmit_fifo_empty(unsigned int com){

	return inb(SERIAL_LINE_STATUS_PORT(com)) & 0x20;
}