Pip
Architecture-dependent parts of Pip: MAL, IAL and boot
Macros | Functions
x86_multiboot/boot/serial.c File Reference
#include "serial.h"
#include "port.h"

Macros

#define PORT   0x3f8
 Serial port COM1 number. More...
 

Functions

void initSerial ()
 Initializes the serial port. More...
 
int serialReceived ()
 Checks whether we received some data on the serial port. More...
 
char readSerial ()
 Gets a character from the serial port. More...
 
int isTransmitEmpty ()
 Checks whether our serial line buffer is empty or not. More...
 
void writeSerial (char a)
 Writes a character into the serial port. More...
 

Macro Definition Documentation

◆ PORT

#define PORT   0x3f8

Serial port COM1 number.

Function Documentation

◆ initSerial()

void initSerial ( )

Initializes the serial port.

◆ isTransmitEmpty()

int isTransmitEmpty ( )

Checks whether our serial line buffer is empty or not.

Returns
0 if it's not empty, 1 else

◆ readSerial()

char readSerial ( )

Gets a character from the serial port.

Returns
The character

◆ serialReceived()

int serialReceived ( )

Checks whether we received some data on the serial port.

Returns
1 if some data is available, 0 else

◆ writeSerial()

void writeSerial ( char  a)

Writes a character into the serial port.

Parameters
aThe character to write