refactoors
[mTask.git] / mTaskCode.icl
index f1da0d8..3cec065 100644 (file)
@@ -2,8 +2,9 @@ implementation module mTaskCode
 
 import Generics.gdynamic
 import Generics.gCons
+import StdEnv
 
-import iTasks
+//import iTasks
 import GenEq, StdMisc, StdArray
 import mTask
 
@@ -77,7 +78,6 @@ instance sds Code where
     in setCode Var +.+ c (type2string v + " " + name + " = " + toCode v + 
        ";\n") +.+ setCode Setup +.+ unMain body}
   con f = defCode f
-  pub _ = undef
 
 defCode :: ((Code t p) -> In t (Main (Code u q))) -> Main (Code u r) | type t
 defCode f =
@@ -622,4 +622,8 @@ instance toCode AnalogPin  where toCode x = consName{|*|} x
 instance toCode Pin where
     toCode (Digital p) = toCode p
     toCode (Analog  p) = toCode p
+instance toCode UserLED where
+       toCode LED1 = toCode 1
+       toCode LED2 = toCode 2
+       toCode LED3 = toCode 3