* Require returns object with Gpio member

This commit is contained in:
michael 2020-02-23 09:00:52 +00:00
parent d5344582b0
commit 1fc88b7218

View File

@ -60,11 +60,15 @@ Type
TNJSGPIOClass = class of TNJSGPIO; TNJSGPIOClass = class of TNJSGPIO;
var var
GPIO : TNJSGPIOClass; TGPIO : TNJSGPIOClass;
implementation implementation
initialization Type
gpio:=TNJSGPIOClass(require('onoff')); TNJSOnOffModule = class external name 'Object' (TJSObject)
end. Gpio : TNJSGPIOClass;
end;
initialization
TGPIO:=TNJSOnOffModule(require('onoff')).Gpio;
end.