diff --git a/modules/drivers/touchpad/esp32/modTouchpad.c b/modules/drivers/touchpad/esp32/modTouchpad.c index 178563041..ed2efb61e 100644 --- a/modules/drivers/touchpad/esp32/modTouchpad.c +++ b/modules/drivers/touchpad/esp32/modTouchpad.c @@ -127,7 +127,7 @@ void xs_touchpad(xsMachine *the) xsSlot tmp; xsmcGet(tmp, xsArg(0), xsID_onReadable); - touchpad->onReadable = xsToReference(tmp); + touchpad->onReadable = xsmcToReference(tmp); xsSetHostHooks(xsThis, (xsHostHooks *)&xsTouchpadHooks); }