clean up redundant lines
[lunaix-os.git] / lunaix-os / hal / char / uart / LConfig
index bbb019df967d4a77c3947ee3daf9d4117bb91d7d..831169cfb119c6637ad4fa7f26d427ba0f3755db 100644 (file)
@@ -1,28 +1,17 @@
 
-@Collection("16x50 Serial Controller")
+@"16x50 Serial Controller"
+@(parent := char_device)
 def uart_16x50():
     """ 16x50 serial controller  """
 
-    # hal/char/LConfig::char_device
-    add_to_collection(char_device)
-
-    @Term("16x50 XT-Compat")
-    def xt_16x50():
+    @"16x50 XT-Compat"
+    def xt_16x50() -> bool:
         """ Enable the 16x50 for PC-compatible platform  """
 
-        type(bool)
-
-        default(True)
-        
-        is_x86 = v(arch) in ["i386", "x86_64"]
-        if not is_x86:
-            set_value(False)
-
-        return is_x86
+        return arch.val in ["i386", "x86_64"]
     
-    @Term("16x50 PCI")
-    def pci_16x50():
+    @"16x50 PCI"
+    def pci_16x50() -> bool:
         """ Enable the support of PCI 16x50 """
-        type(bool)
 
-        default(True)
\ No newline at end of file
+        return True
\ No newline at end of file