Clean up lua API

Rename modem_send() to send()
Rename send to write()
This commit is contained in:
Martin Lund 2024-11-30 11:03:40 +01:00
parent 4511d74a9e
commit c49faa7337
6 changed files with 55 additions and 44 deletions

View file

@ -185,7 +185,7 @@ static int modem_send(lua_State *L)
}
// lua: send(string)
static int send_(lua_State *L)
static int write_(lua_State *L)
{
const char *string = lua_tostring(L, 1);
int ret;
@ -550,8 +550,8 @@ static const struct luaL_Reg tio_lib[] =
{ "sleep", sleep_},
{ "msleep", msleep},
{ "line_set", line_set},
{ "modem_send", modem_send},
{ "send", send_},
{ "send", modem_send},
{ "write", write_},
{ "read", read_string},
{ "read_line", read_line},
{ "expect", expect},