qemu_pci_serial driver
This commit is contained in:
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user