#include <stdint.h>
Go to the source code of this file.
|
int | ser_Init (uint16_t port, uint16_t divisor) |
| Initializes specified Serial port.
|
|
void | ser_PrintChar (uint16_t port, char c) |
| Prints single character to Serial port.
|
|
void | ser_PrintString (uint16_t port, const char *str) |
| Prints string to specified Serial port.
|
|
int | ser_Received (uint16_t port) |
| Checks if port has unread value.
|
|
char | ser_ReadChar (uint16_t port) |
| Reads single character from Serial port.
|
|
◆ COM1
◆ ser_Init()
int ser_Init |
( |
uint16_t |
port, |
|
|
uint16_t |
divisor |
|
) |
| |
◆ ser_PrintChar()
void ser_PrintChar |
( |
uint16_t |
port, |
|
|
char |
c |
|
) |
| |
Prints single character to Serial port.
- Parameters
-
port | Serial port pointer |
c | Character to write |
References outb(), and ser_TransmitEmpty().
◆ ser_PrintString()
void ser_PrintString |
( |
uint16_t |
port, |
|
|
const char * |
str |
|
) |
| |
Prints string to specified Serial port.
- Parameters
-
port | Serial port pointer |
str | String to write |
References ser_PrintChar(), and strlen().
◆ ser_ReadChar()
char ser_ReadChar |
( |
uint16_t |
port | ) |
|
Reads single character from Serial port.
- Parameters
-
- Returns
- char Read character
References inb().
◆ ser_Received()
int ser_Received |
( |
uint16_t |
port | ) |
|
Checks if port has unread value.
- Parameters
-
- Returns
- int 1 if can read
References inb().