omen-osdev / omen

Reliable and modular kernel
55 stars 34 forks source link

Feature/20 serial driver #35

Closed s1nisteR closed 3 weeks ago

s1nisteR commented 3 weeks ago

Implemented serial driver, currently running on COM2.

The following functions were implemented:

int init_serial_dd(uint16_t com_base_addr, uint16_t baud_rate);
int serial_dd_write(uint16_t com, char *buf, size_t len);

Working on the rest now:

serial_dd_read()
serial_dd_ioctl()

For testing purposes, the output to COM2 is being redirected and saved inside com2-serial-log.txt automatically.

Only the following changes were made to the GNUMakefile: -serial stdio -serial com2-serial-log.txt

I tried to keep the -serial stdio unchanged and hence picked COM2 to work on.

s1nisteR commented 3 weeks ago

Changed -serial com2-serial-log.txt to -serial pty which should be cleaner as well as work for everyone.

TretornESP commented 3 weeks ago

I will add a commit over this to use the device stack. As this doesn't break anything will merge anyway 🗡️ Good job!