mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-22 21:09:14 +02:00
* Require returns object with Gpio member
This commit is contained in:
parent
d5344582b0
commit
1fc88b7218
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user