diff options
Diffstat (limited to 'stack/rfcomm/rfc_int.h')
-rw-r--r-- | stack/rfcomm/rfc_int.h | 66 |
1 files changed, 40 insertions, 26 deletions
diff --git a/stack/rfcomm/rfc_int.h b/stack/rfcomm/rfc_int.h index fcafdf0..83a63e3 100644 --- a/stack/rfcomm/rfc_int.h +++ b/stack/rfcomm/rfc_int.h @@ -1,20 +1,34 @@ -/*****************************************************************************/ -/* */ -/* Name: rfc_int.h */ -/* */ -/* Description: This file contains definitions internal to the RFC unit */ -/* */ -/* */ -/* Copyright (c) 1999-2008, Broadcom Corp., All Rights Reserved. */ -/* WIDCOMM Bluetooth Core. Proprietary and confidential. */ -/*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/***************************************************************************** + * + * This file contains definitions internal to the RFC unit + * + *****************************************************************************/ + #ifndef RFC_INT_H #define RFC_INT_H #include "l2c_api.h" #include "port_int.h" -/* +/* ** Define RFCOMM result codes */ #define RFCOMM_SUCCESS 0 @@ -26,9 +40,9 @@ #define RFCOMM_SECURITY_ERR 112 /* -** Define max and min RFCOMM MTU (N1) +** Define max and min RFCOMM MTU (N1) */ -#define RFCOMM_MIN_MTU 23 +#define RFCOMM_MIN_MTU 23 #define RFCOMM_MAX_MTU 32767 extern void RFCOMM_StartReq (tRFC_MCB *p_mcb); @@ -59,7 +73,7 @@ extern void RFCOMM_ControlRsp (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_CTRL *p_pars); extern void RFCOMM_LineStatusReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 line_status); /* -** Define logical struct used for sending and decoding MX frames +** Define logical struct used for sending and decoding MX frames */ typedef struct { @@ -88,14 +102,14 @@ typedef struct UINT8 *p_data; UINT16 data_len; } test; - struct + struct { UINT8 dlci; UINT8 signals; UINT8 break_present; UINT8 break_duration; } msc; - struct + struct { UINT8 ea; UINT8 cr; @@ -141,7 +155,7 @@ typedef struct #define RFC_MX_STATE_DISC_WAIT_UA 6 /* -** Define port states +** Define port states */ #define RFC_STATE_CLOSED 0 #define RFC_STATE_SABME_WAIT_UA 1 @@ -150,8 +164,8 @@ typedef struct #define RFC_STATE_OPENED 4 #define RFC_STATE_DISC_WAIT_UA 5 -/* -** Events that can be received by multiplexer as well as port state machines +/* +** Events that can be received by multiplexer as well as port state machines */ #define RFC_EVENT_SABME 0 #define RFC_EVENT_UA 1 @@ -195,7 +209,7 @@ typedef struct #define RFC_T2_TIMEOUT 20 /* timeout to wait for Mx UIH */ // btla-specific -- #define RFC_DISC_TIMEOUT 3 /* If something goes wrong and we send DISC we should not wait for min */ -#define RFC_CLOSE_TIMEOUT 10 +#define RFC_CLOSE_TIMEOUT 10 #define RFCOMM_CONN_TIMEOUT 120 /* first connection to be established on Mx */ @@ -269,7 +283,7 @@ extern "C" { extern void rfc_mx_sm_execute (tRFC_MCB *p_mcb, UINT16 event, void *p_data); -/* +/* ** Functions provided by the rfc_port_fsm.c */ extern void rfc_port_sm_execute (tPORT *p_port, UINT16 event, void *p_data); @@ -285,7 +299,7 @@ extern void rfc_process_fcon (tRFC_MCB *p_rfc_mcb, BOOLEAN is_command); extern void rfc_process_fcoff (tRFC_MCB *p_rfc_mcb, BOOLEAN is_command); extern void rfc_process_l2cap_congestion (tRFC_MCB *p_mcb, BOOLEAN is_congested); -/* +/* ** Functions provided by the rfc_utils.c */ tRFC_MCB *rfc_alloc_multiplexer_channel (BD_ADDR bd_addr, BOOLEAN is_initiator); @@ -306,7 +320,7 @@ extern void rfc_inc_credit (tPORT *p_port, UINT8 credit); extern void rfc_dec_credit (tPORT *p_port); extern void rfc_check_send_cmd(tRFC_MCB *p_mcb, BT_HDR *p_buf); -/* +/* ** Functions provided by the rfc_ts_frames.c */ extern void rfc_send_sabme (tRFC_MCB *p_rfc_mcb, UINT8 dlci); @@ -316,10 +330,10 @@ extern void rfc_send_disc (tRFC_MCB *p_rfc_mcb, UINT8 dlci); extern void rfc_send_pn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command, UINT16 mtu, UINT8 cl, UINT8 k); extern void rfc_send_test (tRFC_MCB *p_rfc_mcb, BOOLEAN is_command, BT_HDR *p_buf); -extern void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command, +extern void rfc_send_msc (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command, tPORT_CTRL *p_pars); extern void rfc_send_rls (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command, UINT8 status); -extern void rfc_send_rpn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command, +extern void rfc_send_rpn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command, tPORT_STATE *p_pars, UINT16 mask); extern void rfc_send_fcon (tRFC_MCB *p_mcb, BOOLEAN is_command); extern void rfc_send_fcoff (tRFC_MCB *p_mcb, BOOLEAN is_command); @@ -328,7 +342,7 @@ extern void rfc_send_credit(tRFC_MCB *p_mcb, UINT8 dlci, UINT8 credit); extern void rfc_process_mx_message (tRFC_MCB *p_rfc_mcb, BT_HDR *p_buf); extern UINT8 rfc_parse_data (tRFC_MCB *p_rfc_mcb, MX_FRAME *p_frame, BT_HDR *p_buf); -/* +/* ** Functions provided by the rfc_disp.c */ |