fsdev read/write packet use unaligned function

This commit is contained in:
hathach
2024-07-23 19:53:41 +07:00
parent 5d26f5794e
commit c0f38ebf8d
3 changed files with 64 additions and 68 deletions

View File

@@ -173,6 +173,17 @@ uint32_t board_button_read(void) {
return false;
}
size_t board_get_unique_id(uint8_t id[], size_t max_len) {
(void) max_len;
volatile uint32_t* ch32_uuid = ((volatile uint32_t*) 0x1FFFF7E8UL);
uint32_t* serial_32 = (uint32_t*) (uintptr_t) id;
serial_32[0] = ch32_uuid[0];
serial_32[1] = ch32_uuid[1];
serial_32[2] = ch32_uuid[2];
return 12;
}
int board_uart_read(uint8_t *buf, int len) {
(void) buf;
(void) len;