Usermode/ld-acess - PTY 2D commands
authorJohn Hodge <[email protected]>
Mon, 20 May 2013 08:18:24 +0000 (16:18 +0800)
committerJohn Hodge <[email protected]>
Mon, 20 May 2013 08:18:24 +0000 (16:18 +0800)
Usermode/Libraries/ld-acess.so_src/include_exp/acess/devices.h
Usermode/Libraries/ld-acess.so_src/include_exp/acess/devices/pty.h
Usermode/Libraries/ld-acess.so_src/include_exp/acess/devices/pty_cmds.h

index 9ee77b0..53c8361 100644 (file)
@@ -8,6 +8,10 @@
 #ifndef _ACESS_DRIVERS_H
 #define _ACESS_DRIVERS_H
 
+#ifndef PACKED
+#define PACKED __attribute((packed))
+#endif
+
 // === COMMON ===
 enum eDrv_Common {
        /**
index c929e9b..005703d 100644 (file)
@@ -8,6 +8,7 @@
 #ifndef _ACESS_DEVICES_PTY_H_
 #define _ACESS_DEVICES_PTY_H_
 
+
 #include "../devices.h"
 
 #define PTYIMODE_CANON 0x001
@@ -30,12 +31,12 @@ struct ptydims
        short   H;
        short   PW;
        short   PH;
-};
+} PACKED;
 struct ptymode
 {
        unsigned int    OutputMode;
        unsigned int    InputMode;
-};
+} PACKED;
 
 enum
 {
index 4b28190..2ec0cd0 100644 (file)
@@ -22,12 +22,27 @@ enum
        PTY2D_CMD_RECV,
 };
 
+struct ptycmd_header
+{
+       uint8_t         cmd;
+       uint8_t         len_low;
+       uint16_t        len_hi;
+} PACKED;
+
 struct ptycmd_setcursorpos
 {
-       uint16_t        cmd;
+       struct ptycmd_header    hdr;
        uint16_t        x;
        uint16_t        y;
-};
+} PACKED;
+
+struct ptycmd_setcursorbmp
+{
+       struct ptycmd_header    hdr;
+       uint16_t        w;
+       uint16_t        h;
+       char    data[];
+} PACKED;
 
 #endif
 

UCC git Repository :: git.ucc.asn.au