From 64f4dfc2a6894071fd3580ac5f597adc3f638d8a Mon Sep 17 00:00:00 2001 From: soym Date: Wed, 4 Jan 2023 15:06:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=8B=BC=E5=86=99=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sfud/src/sfud.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sfud/src/sfud.c b/sfud/src/sfud.c index 0ed12c9..e9a7fe3 100644 --- a/sfud/src/sfud.c +++ b/sfud/src/sfud.c @@ -72,7 +72,7 @@ static sfud_err reset(const sfud_flash *flash); static sfud_err read_jedec_id(sfud_flash *flash); static sfud_err set_write_enabled(const sfud_flash *flash, bool enabled); static sfud_err set_4_byte_address_mode(sfud_flash *flash, bool enabled); -static void make_adress_byte_array(const sfud_flash *flash, uint32_t addr, uint8_t *array); +static void make_address_byte_array(const sfud_flash *flash, uint32_t addr, uint8_t *array); /* ../port/sfup_port.c */ extern void sfud_log_debug(const char *file, const long line, const char *format, ...); @@ -430,7 +430,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_address_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); } @@ -557,7 +557,7 @@ sfud_err sfud_erase(const sfud_flash *flash, uint32_t addr, size_t size) { } cmd_data[0] = cur_erase_cmd; - make_adress_byte_array(flash, addr, &cmd_data[1]); + make_address_byte_array(flash, addr, &cmd_data[1]); cmd_size = flash->addr_in_4_byte ? 5 : 4; result = spi->wr(spi, cmd_data, cmd_size, NULL, 0); if (result != SFUD_SUCCESS) { @@ -639,7 +639,7 @@ static sfud_err page256_or_1_byte_write(const sfud_flash *flash, uint32_t addr, goto __exit; } cmd_data[0] = SFUD_CMD_PAGE_PROGRAM; - make_adress_byte_array(flash, addr, &cmd_data[1]); + make_address_byte_array(flash, addr, &cmd_data[1]); cmd_size = flash->addr_in_4_byte ? 5 : 4; /* make write align and calculate next write address */ @@ -731,7 +731,7 @@ static sfud_err aai_write(const sfud_flash *flash, uint32_t addr, size_t size, c cmd_data[0] = SFUD_CMD_AAI_WORD_PROGRAM; while (size >= 2) { if (first_write) { - make_adress_byte_array(flash, addr, &cmd_data[1]); + make_address_byte_array(flash, addr, &cmd_data[1]); cmd_size = flash->addr_in_4_byte ? 5 : 4; cmd_data[cmd_size] = *data; cmd_data[cmd_size + 1] = *(data + 1); @@ -995,7 +995,7 @@ static sfud_err wait_busy(const sfud_flash *flash) { return result; } -static void make_adress_byte_array(const sfud_flash *flash, uint32_t addr, uint8_t *array) { +static void make_address_byte_array(const sfud_flash *flash, uint32_t addr, uint8_t *array) { uint8_t len, i; SFUD_ASSERT(flash);