-
-derive gPrint Long, UserLED, Button, AnalogPin, DigitalPin, PinMode, Pin, BC
-derive class gCons BC
+instance fromByteCode MTaskDeviceSpec where
+ fromByteCode s = let c = toInt s.[0] in
+ {MTaskDeviceSpec
+ |haveLed=(c bitand 1) > 0
+ ,haveAio=(c bitand 2) > 0
+ ,haveDio=(c bitand 4) > 0
+ ,bytesMemory=from16bit $ s % (1,3)
+ }
+
+derive gPrint Long, UserLED, Button, AnalogPin, DigitalPin, PinMode, Pin, BC, MTaskDeviceSpec
+derive class gCons BC, BCShare