Skip to content

Commit

Permalink
fix: ulwip库在idf5下编译失败
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed May 1, 2024
1 parent 87b64dd commit 2d0422d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/network/ulwip/binding/luat_lib_ulwip.c
Expand Up @@ -649,7 +649,7 @@ static int l_ulwip_xt804_xfer(lua_State *L) {
for (size_t i = 0; i < len / auto_len; i++) {
memcpy(tmp+1, zbuff->addr + offset, auto_len);
luat_gpio_set(cs_pin, 0);
luat_spi_send(spi_id, tmp, auto_len + 1);
luat_spi_send(spi_id, (const char*)tmp, auto_len + 1);
luat_gpio_set(cs_pin, 1);
offset += auto_len;
}
Expand All @@ -658,8 +658,8 @@ static int l_ulwip_xt804_xfer(lua_State *L) {
for (size_t i = 0; i < len / auto_len; i++) {
luat_gpio_set(cs_pin, 0);
memcpy(tmp+1, zbuff->addr + offset, auto_len);
luat_spi_send(spi_id, tmp, 1);
luat_spi_recv(spi_id, zbuff->addr + offset, auto_len);
luat_spi_send(spi_id, (const char*)tmp, 1);
luat_spi_recv(spi_id, (char*)(zbuff->addr + offset), auto_len);
luat_gpio_set(cs_pin, 1);
offset += auto_len;
}
Expand Down

0 comments on commit 2d0422d

Please sign in to comment.