int getchar(void)
{
uint8_t ch = 0;
if (uart_recv( &ch ) == 0)
{
return 0;
}
putchar(ch);
if (ch == '
')
{
putchar('
');
}
return ch;
}
编译出现的错误是:
error: #79: expected a type specifier
error: #141-D: unnamed prototyped parameters not allowed when body is present
error: #55-D: too many arguments in invocation of macro "getchar"
请求指点。
一周热门 更多>