严格代码检查,修复大量错误,以及diskio.c ioctl参数大小导致的卡死问题
This commit is contained in:
@@ -39,6 +39,18 @@ void putc(int c)
|
||||
{
|
||||
uart_putc(uart_get_global(), c);
|
||||
}
|
||||
void put_bytes(const uint8_t *data, size_t len)
|
||||
{
|
||||
umword_t state = 0;
|
||||
state = spinlock_lock(&lock);
|
||||
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
uart_putc(uart_get_global(), data[i]);
|
||||
}
|
||||
|
||||
spinlock_set(&lock, state);
|
||||
}
|
||||
int getc(void)
|
||||
{
|
||||
return uart_getc(uart_get_global());
|
||||
|
||||
Reference in New Issue
Block a user