bsp,abstract-machine,uart: add preset command in _uart_getc()
* but it is not parsed
This commit is contained in:
parent
e5eb90efca
commit
7e91ba791e
2 changed files with 4 additions and 3 deletions
|
@ -1,9 +1,10 @@
|
|||
#include <klib.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
char *strchr(const char *s, int c) {
|
||||
assert(0);
|
||||
}
|
||||
|
||||
char *strstr(const char *haystack, const char *needle) {
|
||||
assert(0);
|
||||
return rt_strstr(haystack, needle);
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@ static int _uart_putc(struct rt_serial_device *serial, char c) {
|
|||
}
|
||||
|
||||
static int _uart_getc(struct rt_serial_device *serial) {
|
||||
assert(0);
|
||||
return -1;
|
||||
static const char *p = "help\n";
|
||||
return (*p != '\0' ? *(p ++) : -1);
|
||||
}
|
||||
|
||||
const struct rt_uart_ops _uart_ops = {
|
||||
|
|
Loading…
Add table
Reference in a new issue