1 /****************************************************************************** 2 * 3 * Copyright (C) 2004-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 * This is the interface file for pan call-in functions. 22 * 23 ******************************************************************************/ 24 #ifndef BTA_PAN_CI_H 25 #define BTA_PAN_CI_H 26 27 #include "bta_pan_api.h" 28 29 /***************************************************************************** 30 * Function Declarations 31 ****************************************************************************/ 32 /******************************************************************************* 33 * 34 * Function bta_pan_ci_tx_ready 35 * 36 * Description This function sends an event to PAN indicating the phone is 37 * ready for more data and PAN should call 38 * bta_pan_co_tx_path(). 39 * This function is used when the TX data path is configured 40 * to use a pull interface. 41 * 42 * 43 * Returns void 44 * 45 ******************************************************************************/ 46 extern void bta_pan_ci_tx_ready(uint16_t handle); 47 48 /******************************************************************************* 49 * 50 * Function bta_pan_ci_rx_ready 51 * 52 * Description This function sends an event to PAN indicating the phone 53 * has data available to send to PAN and PAN should call 54 * bta_pan_co_rx_path(). This function is used when the RX 55 * data path is configured to use a pull interface. 56 * 57 * 58 * Returns void 59 * 60 ******************************************************************************/ 61 extern void bta_pan_ci_rx_ready(uint16_t handle); 62 63 /******************************************************************************* 64 * 65 * Function bta_pan_ci_tx_flow 66 * 67 * Description This function is called to enable or disable data flow on 68 * the TX path. The phone should call this function to 69 * disable data flow when it is congested and cannot handle 70 * any more data sent by bta_pan_co_tx_write() or 71 * bta_pan_co_tx_writebuf(). This function is used when the 72 * TX data path is configured to use a push interface. 73 * 74 * 75 * Returns void 76 * 77 ******************************************************************************/ 78 extern void bta_pan_ci_tx_flow(uint16_t handle, bool enable); 79 80 /******************************************************************************* 81 * 82 * Function bta_pan_ci_rx_writebuf 83 * 84 * Description This function is called to send data to the phone when 85 * the RX path is configured to use a push interface with 86 * zero copy. The function sends an event to PAN containing 87 * the data buffer. The buffer will be freed by BTA; the 88 * phone must not free the buffer. 89 * 90 * 91 * Returns true if flow enabled 92 * 93 ******************************************************************************/ 94 extern void bta_pan_ci_rx_writebuf(uint16_t handle, BD_ADDR src, BD_ADDR dst, 95 uint16_t protocol, BT_HDR* p_buf, bool ext); 96 97 /******************************************************************************* 98 * 99 * Function bta_pan_ci_readbuf 100 * 101 * Description This function is called by the phone to read data from PAN 102 * when the TX path is configured to use a pull interface. 103 * The caller must free the buffer when it is through 104 * processing the buffer. 105 * 106 * 107 * Returns void 108 * 109 ******************************************************************************/ 110 extern BT_HDR* bta_pan_ci_readbuf(uint16_t handle, BD_ADDR src, BD_ADDR dst, 111 uint16_t* p_protocol, bool* p_ext, 112 bool* p_forward); 113 114 /******************************************************************************* 115 * 116 * Function bta_pan_ci_set_pfilters 117 * 118 * Description This function is called to set protocol filters 119 * 120 * 121 * Returns void 122 * 123 ******************************************************************************/ 124 extern void bta_pan_ci_set_pfilters(uint16_t handle, uint16_t num_filters, 125 uint16_t* p_start_array, 126 uint16_t* p_end_array); 127 128 /******************************************************************************* 129 * 130 * Function bta_pan_ci_set_mfilters 131 * 132 * Description This function is called to set multicast filters 133 * 134 * 135 * Returns void 136 * 137 ******************************************************************************/ 138 extern void bta_pan_ci_set_mfilters(uint16_t handle, uint16_t num_mcast_filters, 139 uint8_t* p_start_array, 140 uint8_t* p_end_array); 141 142 #endif /* BTA_PAN_CI_H */ 143