22 lines
404 B
C
22 lines
404 B
C
#include <stdint.h>
|
|
#include <stddef.h>
|
|
#include <ulib.h>
|
|
|
|
void diagdummy_serialprint(void) {
|
|
char *str = "Hello world\n";
|
|
|
|
if (argslen() >= 2) {
|
|
str = args()[1];
|
|
}
|
|
|
|
Dev_t serialdev;
|
|
dev_gethandle(&serialdev, "serialdev");
|
|
|
|
char *s = str;
|
|
while (*s) {
|
|
while(!dev_cmd(&serialdev, DEV_SERIALDEV_SENDREADY, NULL, 0));
|
|
dev_cmd(&serialdev, DEV_SERIALDEV_SENDB, s, 1);
|
|
s++;
|
|
}
|
|
}
|