Added ports/serial.h header for serial console stuff

This commit is contained in:
2024-10-09 16:50:56 +02:00
parent 95d32f025a
commit 4ee3940807
5 changed files with 80 additions and 4 deletions
+24
View File
@@ -0,0 +1,24 @@
#ifndef PORTS_SERIAL_H
#define PORTS_SERIAL_H
#include <stdint.h>
#define PORT_COM1 0x3f8
#define PORT_COM2 0x2f8
#define PORT_COM3 0x3e8
#define PORT_COM4 0x2e8
#define PORT_COM5 0x5f8
#define PORT_COM6 0x4f8
#define PORT_COM7 0x5e8
#define PORT_COM8 0x4e8
int setupSerial(uint32_t port);
int serialTransmitEmpty(uint32_t port);
int serialRecieved(uint32_t port);
void serialWrite(uint32_t port, char c);
void serialPrint(uint32_t port, char* s);
char serialRead(uint32_t port);
#endif