more with -Wcast-qual

This commit is contained in:
hathach
2021-10-17 16:26:27 +07:00
parent 0b249618b0
commit a5f516893b
34 changed files with 70 additions and 48 deletions
+7 -2
View File
@@ -101,9 +101,14 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
int32_t offset = 0;
uint8_t const* buf8 = (uint8_t const*) buf;
for (offset = 0; offset < len; offset++)
if (! (messible_status_read() & CSR_MESSIBLE_STATUS_FULL_OFFSET))
messible_in_write(((uint8_t *)buf)[offset]);
{
if (!(messible_status_read() & CSR_MESSIBLE_STATUS_FULL_OFFSET))
{
messible_in_write(buf8[offset]);
}
}
return len;
}