PatchworkOS
Loading...
Searching...
No Matches
com.c File Reference

Go to the source code of this file.

Functions

void com_init (com_port_t port)
 
uint8_t com_read (com_port_t port)
 
void com_write (com_port_t port, uint8_t value)
 
uint8_t com_reg_read (com_port_t port, com_reg_t reg)
 
void com_reg_write (com_port_t port, com_reg_t reg, uint8_t value)
 

Function Documentation

◆ com_init()

◆ com_read()

uint8_t com_read ( com_port_t  port)

Definition at line 14 of file com.c.

References COM_LINE_READ_READY, COM_REG_LINE_STATUS, com_reg_read(), and COM_REG_RECEIVE.

◆ com_reg_read()

uint8_t com_reg_read ( com_port_t  port,
com_reg_t  reg 
)

Definition at line 32 of file com.c.

References port_inb().

Referenced by com_read(), and com_write().

◆ com_reg_write()

void com_reg_write ( com_port_t  port,
com_reg_t  reg,
uint8_t  value 
)

Definition at line 37 of file com.c.

References port_outb().

Referenced by com_init(), and com_write().

◆ com_write()

void com_write ( com_port_t  port,
uint8_t  value 
)

Definition at line 23 of file com.c.

References COM_LINE_WRITE_READY, COM_REG_LINE_STATUS, com_reg_read(), COM_REG_TRANSMIT, and com_reg_write().

Referenced by log_write().