Skip to content

Commit 23c5ab9

Browse files
committed
spi: use advanced open function with 32-bit extra flags
1 parent 1287c6f commit 23c5ab9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lua_spi.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static int lua_spi_open(lua_State *L) {
9292
uint32_t max_speed;
9393
spi_bit_order_t bit_order;
9494
uint8_t bits_per_word;
95-
uint8_t extra_flags;
95+
uint32_t extra_flags;
9696
int ret;
9797

9898
spi = *((spi_t **)luaL_checkudata(L, 1, "periphery.SPI"));
@@ -158,7 +158,7 @@ static int lua_spi_open(lua_State *L) {
158158
max_speed = lua_tounsigned(L, 4);
159159
}
160160

161-
if ((ret = spi_open_advanced(spi, device, mode, max_speed, bit_order, bits_per_word, extra_flags)) < 0)
161+
if ((ret = spi_open_advanced2(spi, device, mode, max_speed, bit_order, bits_per_word, extra_flags)) < 0)
162162
return lua_spi_error(L, ret, spi_errno(spi), spi_errmsg(spi));
163163

164164
return 0;

0 commit comments

Comments
 (0)