1/****************************************************************************** 2 * 3 * Copyright (C) 2007-2012 Broadcom Corporation 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19/****************************************************************************** 20 * 21 * UIPC wrapper interface 22 * 23 ******************************************************************************/ 24#ifndef UIPC_H 25#define UIPC_H 26 27#ifndef UDRV_API 28#define UDRV_API 29#endif 30 31 32#define UIPC_CH_ID_ALL 0 /* used to address all the ch id at once */ 33#define UIPC_CH_ID_0 1 /* shared mem interface */ 34#define UIPC_CH_ID_1 2 /* TCP socket (GPS) */ 35#define UIPC_CH_ID_2 3 /* BSA control socket */ 36#define UIPC_CH_ID_3 4 /* BSA HH */ 37#define UIPC_CH_ID_4 5 /* Future usage */ 38#define UIPC_CH_ID_5 6 /* Future usage */ 39#define UIPC_CH_ID_6 7 /* Future usage */ 40#define UIPC_CH_ID_7 8 /* Future usage */ 41#define UIPC_CH_ID_8 9 /* Future usage */ 42#define UIPC_CH_ID_9 10 /* Future usage */ 43#define UIPC_CH_ID_10 11 /* Future usage */ 44#define UIPC_CH_ID_11 12 /* Future usage */ 45#define UIPC_CH_ID_12 13 /* Future usage */ 46#define UIPC_CH_ID_13 14 /* Future usage */ 47#define UIPC_CH_ID_14 15 /* Future usage */ 48#define UIPC_CH_ID_15 16 /* Future usage */ 49#define UIPC_CH_ID_16 17 /* Future usage */ 50#define UIPC_CH_ID_17 18 /* Future usage */ 51#define UIPC_CH_ID_18 19 /* Future usage */ 52#define UIPC_CH_ID_19 20 /* Future usage */ 53#define UIPC_CH_ID_20 21 /* Future usage */ 54#define UIPC_CH_ID_21 22 /* Future usage */ 55#define UIPC_CH_ID_22 23 /* Future usage */ 56#define UIPC_CH_ID_23 24 /* Future usage */ 57#define UIPC_CH_ID_24 25 /* Future usage */ 58 59 60 61#define UIPC_CH_NUM 25 62 63typedef UINT8 tUIPC_CH_ID; 64 65 66typedef 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) */ 67 68#ifdef __cplusplus 69extern "C" 70{ 71#endif 72 73/******************************************************************************* 74** 75** Function UIPC_Init 76** 77** Description Initialize UIPC module 78** 79** Returns void 80** 81*******************************************************************************/ 82UDRV_API extern void UIPC_Init(void *); 83 84/******************************************************************************* 85** 86** Function UIPC_Open 87** 88** Description Open UIPC interface 89** 90** Returns void 91** 92*******************************************************************************/ 93UDRV_API extern BOOLEAN UIPC_Open(tUIPC_CH_ID ch_id, tUIPC_RCV_CBACK *p_cback); 94 95/******************************************************************************* 96** 97** Function UIPC_Close 98** 99** Description Close UIPC interface 100** 101** Returns void 102** 103*******************************************************************************/ 104UDRV_API extern void UIPC_Close(tUIPC_CH_ID ch_id); 105 106/******************************************************************************* 107** 108** Function UIPC_SendBuf 109** 110** Description Called to transmit a message over UIPC. 111** Message buffer will be freed by UIPC_SendBuf. 112** 113** Returns void 114** 115*******************************************************************************/ 116UDRV_API extern BOOLEAN UIPC_SendBuf(tUIPC_CH_ID ch_id, BT_HDR *p_msg); 117 118/******************************************************************************* 119** 120** Function UIPC_Send 121** 122** Description Called to transmit a message over UIPC. 123** 124** Returns void 125** 126*******************************************************************************/ 127UDRV_API extern BOOLEAN UIPC_Send(tUIPC_CH_ID ch_id, UINT16 msg_evt, UINT8 *p_buf, UINT16 msglen); 128 129/******************************************************************************* 130** 131** Function UIPC_Read 132** 133** Description Called to read a message from UIPC. 134** 135** Returns void 136** 137*******************************************************************************/ 138UDRV_API extern UINT32 UIPC_Read(tUIPC_CH_ID ch_id, UINT16 *p_msg_evt, UINT8 *p_buf, UINT32 len); 139 140/******************************************************************************* 141** 142** Function UIPC_Ioctl 143** 144** Description Called to control UIPC. 145** 146** Returns void 147** 148*******************************************************************************/ 149UDRV_API extern BOOLEAN UIPC_Ioctl(tUIPC_CH_ID ch_id, UINT32 request, void *param); 150 151#ifdef __cplusplus 152} 153#endif 154 155 156#endif /* UIPC_H */ 157 158 159