add flash and timer driver for hc32f4a0

This commit is contained in:
wuzheng
2023-02-17 16:21:06 +08:00
parent ba51d8ba8e
commit 002325c1d8
28 changed files with 806 additions and 87 deletions
@@ -444,7 +444,7 @@ sfud_err sfud_read(const sfud_flash *flash, uint32_t addr, size_t size, uint8_t
#endif
{
cmd_data[0] = SFUD_CMD_READ_DATA;
make_adress_byte_array(flash, addr, &cmd_data[1]);
make_adress_byte_array(flash, addr, cmd_data+1);
cmd_size = flash->addr_in_4_byte ? 5 : 4;
result = spi->wr(spi, cmd_data, cmd_size, data, size);
}