qemu_pci_serial driver

This commit is contained in:
2025-11-23 22:56:45 +01:00
parent d3a91b6438
commit 33b3a641fb
10 changed files with 141 additions and 99 deletions

View File

@ -2,6 +2,11 @@
#include <stddef.h>
#include <ulib.h>
#define SENDB 0
#define SENDREADY 1
#define RECVB 2
#define RECVREADY 3
void diagdummy_serialprint(void) {
char *str = "Hello world\n";
@ -14,8 +19,8 @@ void diagdummy_serialprint(void) {
char *s = str;
while (*s) {
while(!dev_cmd(&serialdev, DEV_SERIALDEV_SENDREADY, NULL, 0));
dev_cmd(&serialdev, DEV_SERIALDEV_SENDB, s, 1);
while(!dev_cmd(&serialdev, SENDREADY, NULL, 0));
dev_cmd(&serialdev, SENDB, s, 1);
s++;
}
}