Correct level value in gpio.trig() callback (#2883)

This commit is contained in:
Marcel Stör 2020-05-02 21:18:17 +02:00 committed by GitHub
commit 189fe9646f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ static void nodemcu_gpio_callback_task (task_param_t param, task_prio_t prio)
{
(void)prio;
uint32_t gpio = (uint32_t)param & 0xffu;
int level = ((int)param) & 0x100u;
int level = (((int)param) & 0x100u) >> 8;
lua_State *L = lua_getstate ();
if (gpio_cb_refs[gpio] != LUA_NOREF)