rewrite the device subsystem interfaces (#48)
[lunaix-os.git] / lunaix-os / includes / hal / serial.h
index c346c51cc2068fd2e0ea716b562d266847263b33..ba2185c96ef35a1349e47b1844ba199624566c8b 100644 (file)
@@ -6,9 +6,10 @@
 #include <lunaix/ds/mutex.h>
 #include <lunaix/ds/waitq.h>
 #include <lunaix/ds/rbuffer.h>
 #include <lunaix/ds/mutex.h>
 #include <lunaix/ds/waitq.h>
 #include <lunaix/ds/rbuffer.h>
-
 #include <hal/term.h>
 
 #include <hal/term.h>
 
+#include <usr/lunaix/serial.h>
+
 #define SERIAL_RW_RX 0x0
 #define SERIAL_RW_TX 0x1
 #define io_dir(flags) ((flags) & SERIAL_RW_TX)
 #define SERIAL_RW_RX 0x0
 #define SERIAL_RW_TX 0x1
 #define io_dir(flags) ((flags) & SERIAL_RW_TX)
@@ -28,12 +29,13 @@ struct serial_dev
     struct device* dev;
     struct waitq wq_rxdone;
     struct waitq wq_txdone;
     struct device* dev;
     struct waitq wq_rxdone;
     struct waitq wq_txdone;
-    struct term* at_term;
     void* backend;
 
     struct rbuffer rxbuf;
     int wr_len;
 
     void* backend;
 
     struct rbuffer rxbuf;
     int wr_len;
 
+    struct termport_potens* tp_cap;
+
     /**
      * @brief Write buffer to TX. The return code indicate
      * the transaction is either done in synced mode (TX_DONE) or will be
     /**
      * @brief Write buffer to TX. The return code indicate
      * the transaction is either done in synced mode (TX_DONE) or will be