GitOS
Operating system exercise
Loading...
Searching...
No Matches
serial.h
Go to the documentation of this file.
1#pragma once
2#include <stdint.h>
3
4#define COM1 0x3f8
5
6int ser_Init(uint16_t port, uint16_t divisor);
7void ser_PrintChar(uint16_t port, char c);
8void ser_PrintString(uint16_t port, const char* str);
9int ser_Received(uint16_t port);
10char ser_ReadChar(uint16_t port);
11
char ser_ReadChar(uint16_t port)
Reads single character from Serial port.
Definition serial.c:97
void ser_PrintString(uint16_t port, const char *str)
Prints string to specified Serial port.
Definition serial.c:70
int ser_Init(uint16_t port, uint16_t divisor)
Initializes specified Serial port.
Definition serial.c:15
void ser_PrintChar(uint16_t port, char c)
Prints single character to Serial port.
Definition serial.c:58
int ser_Received(uint16_t port)
Checks if port has unread value.
Definition serial.c:86