diff options
Diffstat (limited to 'udrv/include/uipc.h')
-rw-r--r-- | udrv/include/uipc.h | 68 |
1 files changed, 24 insertions, 44 deletions
diff --git a/udrv/include/uipc.h b/udrv/include/uipc.h index 9fa6fbd..f5847c9 100644 --- a/udrv/include/uipc.h +++ b/udrv/include/uipc.h @@ -16,65 +16,44 @@ #define UDRV_API #endif +#define UIPC_CH_ID_AV_CTRL 0 +#define UIPC_CH_ID_AV_AUDIO 1 +#define UIPC_CH_NUM 2 -#define UIPC_CH_ID_ALL 0 /* used to address all the ch id at once */ -#define UIPC_CH_ID_0 1 /* shared mem interface */ -#define UIPC_CH_ID_1 2 /* TCP socket (GPS) */ -#define UIPC_CH_ID_2 3 /* BTIF control socket */ -#define UIPC_CH_ID_3 4 /* BTIF HH */ -#define UIPC_CH_ID_4 5 /* Future usage */ -#define UIPC_CH_ID_5 6 /* Future usage */ -#define UIPC_CH_ID_6 7 /* Future usage */ -#define UIPC_CH_ID_7 8 /* Future usage */ -#define UIPC_CH_ID_8 9 /* Future usage */ -#define UIPC_CH_ID_9 10 /* Future usage */ -#define UIPC_CH_ID_10 11 /* Future usage */ -#define UIPC_CH_ID_11 12 /* Future usage */ -#define UIPC_CH_ID_12 13 /* Future usage */ -#define UIPC_CH_ID_13 14 /* Future usage */ -#define UIPC_CH_ID_14 15 /* Future usage */ -#define UIPC_CH_ID_15 16 /* Future usage */ -#define UIPC_CH_ID_16 17 /* Future usage */ -#define UIPC_CH_ID_17 18 /* Future usage */ -#define UIPC_CH_ID_18 19 /* Future usage */ -#define UIPC_CH_ID_19 20 /* Future usage */ -#define UIPC_CH_ID_20 21 /* Future usage */ -#define UIPC_CH_ID_21 22 /* Future usage */ -#define UIPC_CH_ID_22 23 /* Future usage */ -#define UIPC_CH_ID_23 24 /* Future usage */ -#define UIPC_CH_ID_24 25 /* Future usage */ - - - -#define UIPC_CH_NUM 25 +#define UIPC_CH_ID_ALL 3 /* used to address all the ch id at once */ + +#define DEFAULT_READ_POLL_TMO_MS 100 typedef UINT8 tUIPC_CH_ID; +/* Events generated */ +typedef enum { + UIPC_OPEN_EVT = 0x0001, + UIPC_CLOSE_EVT = 0x0002, + UIPC_RX_DATA_EVT = 0x0004, + UIPC_RX_DATA_READY_EVT = 0x0008, + UIPC_TX_DATA_READY_EVT = 0x0010 +} tUIPC_EVENT; + /* * UIPC IOCTL Requests */ -enum -{ - UIPC_REQ_TX_FLUSH = 1, /* Request to flush the TX FIFO */ - UIPC_REQ_RX_FLUSH, /* Request to flush the RX FIFO */ - - UIPC_WRITE_BLOCK, /* Make write blocking */ - UIPC_WRITE_NONBLOCK, /* Make write non blocking */ - UIPC_REG_CBACK, /* Set a new call back */ - UIPC_SET_RX_WM, /* Set Rx water mark */ +#define UIPC_REQ_RX_FLUSH 1 +#define UIPC_REG_CBACK 2 +#define UIPC_REG_REMOVE_ACTIVE_READSET 3 +#define UIPC_SET_READ_POLL_TMO 4 - UIPC_REQ_TX_READY, /* Request an indication when Tx ready */ - UIPC_REQ_RX_READY /* Request an indication when Rx data ready */ -}; - -typedef void (tUIPC_RCV_CBACK)(BT_HDR *p_msg); /* points to BT_HDR which describes event type and length of data; len contains the number of bytes of entire message (sizeof(BT_HDR) + offset + size of data) */ +typedef void (tUIPC_RCV_CBACK)(tUIPC_CH_ID ch_id, tUIPC_EVENT event); /* points to BT_HDR which describes event type and length of data; len contains the number of bytes of entire message (sizeof(BT_HDR) + offset + size of data) */ #ifdef __cplusplus extern "C" { #endif +const char* dump_uipc_event(tUIPC_EVENT event); + + /******************************************************************************* ** ** Function UIPC_Init @@ -153,6 +132,7 @@ UDRV_API extern UINT32 UIPC_Read(tUIPC_CH_ID ch_id, UINT16 *p_msg_evt, UINT8 *p_ *******************************************************************************/ UDRV_API extern BOOLEAN UIPC_Ioctl(tUIPC_CH_ID ch_id, UINT32 request, void *param); + #ifdef __cplusplus } #endif |