]> rtime.felk.cvut.cz Git - tiny-bt.git/blobdiff - src/hil2cap.h
begin part of slave main cycle with ansvering the incoming events
[tiny-bt.git] / src / hil2cap.h
index 1434a4e5dac5ef2fc0dfe6d3b35eae8bc2f3ba08..826ab3e282dbac81647b15ab00234f95c1924d38 100644 (file)
 #define DISCONNECTED   0
 #define CONNECTED      1
 
-/* CMD request states*/
+/* CMD\EVT states*/
 #define FREE           0
 #define ESTABLISHED    1
-#define PENDING        2
+#define PERMANENT      2
 #define DONE           3
 
 /* CMD ocf and ogf */
@@ -41,6 +41,7 @@
 
 
 #define MAX_CMD_STATE_REQUEST 0x0F
+#define MAX_EVT_COUNT  128
 typedef struct{
        __u8 actual_status;
        __u8 id;
@@ -50,6 +51,12 @@ typedef struct{
 
 } __attribute__((packed)) cmd_state_request;
 
+typedef struct{
+       __u8 actual_status;
+       __u16 id;
+       __u16 evt_code;
+       void (*p_serv_rutine)(void);
+} __attribute__((packed)) incoming_evt;
 
 typedef struct{
        __u16 con_id;