Rewrite the lunabuild toolchain with enhanced feature (#60)
[lunaix-os.git] / lunaix-os / hal / char / LConfig
index 788bfb4bff1d20a9bbccfbfa28782e57c242f26a..dd2fa0f0c498026e8f8a7737e91c573a72dcbd38 100644 (file)
@@ -1,21 +1,26 @@
-include("uart")
+from . import uart
 
-@Collection
+@"Character Devices"
+@(parent := hal)
 def char_device():
     """ Controlling support of character devices """
 
-    add_to_collection(hal)
+    @"VGA 80x25 text-mode console"
+    def vga_console() -> bool:
+        """ 
+            Enable VGA console device (text mode only) 
+        """
+        require (use_graphic_dev)
+        
+        return True
 
-    @Term
-    def vga_console():
-        """ Enable VGA console device (text mode only) """
+    @"VGA character game device"
+    def chargame_console() -> bool:
+        """ 
+            Enable VGA Charactor Game console device (text mode only) 
 
-        type(bool)
-        default(True)
+            You normally don't need to include this, unless you want some user space fun ;)
+        """
+        require (vga_console)
 
-    @Term
-    def chargame_console():
-        """ Enable VGA Charactor Game console device (text mode only) """
-
-        type(bool)
-        default(False)
\ No newline at end of file
+        return False
\ No newline at end of file