component/bt : run astyle handle the code files

This commit is contained in:
Tian Hao
2016-11-25 02:10:15 +08:00
parent d7eb709a9c
commit 19273c7b2d
268 changed files with 29938 additions and 36146 deletions
+9 -15
View File
@@ -51,8 +51,7 @@
/*
** Define Port Data Transfere control block
*/
typedef struct
{
typedef struct {
BUFFER_Q queue; /* Queue of buffers waiting to be sent */
BOOLEAN peer_fc; /* TRUE if flow control is set based on peer's request */
BOOLEAN user_fc; /* TRUE if flow control is set based on user's request */
@@ -63,8 +62,7 @@ typedef struct
/*
** Port control structure used to pass modem info
*/
typedef struct
{
typedef struct {
#define MODEM_SIGNAL_DTRDSR 0x01
#define MODEM_SIGNAL_RTSCTS 0x02
#define MODEM_SIGNAL_RI 0x04
@@ -88,12 +86,11 @@ typedef struct
/*
** RFCOMM multiplexer Control Block
*/
typedef struct
{
typedef struct {
TIMER_LIST_ENT tle; /* Timer list entry */
BUFFER_Q cmd_q; /* Queue for command messages on this mux */
UINT8 port_inx[RFCOMM_MAX_DLCI + 1]; /* Array for quick access to */
/* tPORT based on dlci */
/* tPORT based on dlci */
BD_ADDR bd_addr; /* BD ADDR of the peer if initiator */
UINT16 lcid; /* Local cid used for this channel */
UINT16 peer_l2cap_mtu; /* Max frame that can be sent to peer L2CAP */
@@ -114,8 +111,7 @@ typedef struct
/*
** RFCOMM Port Connection Control Block
*/
struct t_rfc_port
{
struct t_rfc_port {
#define RFC_PORT_STATE_IDLE 0
#define RFC_PORT_STATE_WAIT_START 1
#define RFC_PORT_STATE_OPENING 2
@@ -142,8 +138,7 @@ typedef struct t_rfc_port tRFC_PORT;
/*
** Define control block containing information about PORT connection
*/
struct t_port_info
{
struct t_port_info {
UINT8 inx; /* Index of this control block in the port_info array */
BOOLEAN in_use; /* True when structure is allocated */
@@ -197,12 +192,12 @@ struct t_port_info
tPORT_DATA_CO_CALLBACK *p_data_co_callback; /* Callback function with callouts and flowctrl */
UINT16 credit_tx; /* Flow control credits for tx path */
UINT16 credit_rx; /* Flow control credits for rx path, this is */
/* number of buffers peer is allowed to sent */
/* number of buffers peer is allowed to sent */
UINT16 credit_rx_max; /* Max number of credits we will allow this guy to sent */
UINT16 credit_rx_low; /* Number of credits when we send credit update */
UINT16 rx_buf_critical; /* port receive queue critical watermark level */
BOOLEAN keep_port_handle; /* TRUE if port is not deallocated when closing */
/* it is set to TRUE for server when allocating port */
/* it is set to TRUE for server when allocating port */
UINT16 keep_mtu; /* Max MTU that port can receive by server */
};
typedef struct t_port_info tPORT;
@@ -210,8 +205,7 @@ typedef struct t_port_info tPORT;
/* Define the PORT/RFCOMM control structure
*/
typedef struct
{
typedef struct {
tPORT port[MAX_RFC_PORTS]; /* Port info pool */
tRFC_MCB rfc_mcb[MAX_BD_CONNECTIONS]; /* RFCOMM bd_connections pool */
} tPORT_CB;
+11 -21
View File
@@ -75,8 +75,7 @@ extern void RFCOMM_LineStatusReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 line_status
/*
** Define logical struct used for sending and decoding MX frames
*/
typedef struct
{
typedef struct {
UINT8 dlci;
UINT8 type;
UINT8 cr;
@@ -84,10 +83,8 @@ typedef struct
UINT8 pf;
UINT8 credit;
union
{
struct
{
union {
struct {
UINT8 dlci;
UINT8 frame_type;
UINT8 conv_layer;
@@ -97,26 +94,22 @@ typedef struct
UINT8 n2;
UINT8 k;
} pn;
struct
{
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;
UINT8 type;
} nsc;
struct
{
struct {
UINT8 dlci;
UINT8 is_request;
UINT8 baud_rate;
@@ -129,8 +122,7 @@ typedef struct
UINT8 xoff_char;
UINT16 param_mask;
} rpn;
struct
{
struct {
UINT8 dlci;
UINT8 line_status;
} rls;
@@ -215,8 +207,7 @@ typedef struct
/* Define RFComm control block
*/
typedef struct
{
typedef struct {
MX_FRAME rx_frame;
tL2CAP_APPL_INFO reg_info; /* L2CAP Registration info */
tRFC_MCB *p_rfc_lcid_mcb[MAX_L2CAP_CHANNELS]; /* MCB based on the L2CAP's lcid */
@@ -226,8 +217,7 @@ typedef struct
} tRFCOMM_CB;
/* Main Control Block for the RFCOMM Layer (PORT and RFC) */
typedef struct
{
typedef struct {
tRFCOMM_CB rfc;
tPORT_CB port;
UINT8 trace_level;
@@ -315,7 +305,7 @@ tRFC_MCB *rfc_find_lcid_mcb (UINT16 lcid);
extern void rfc_save_lcid_mcb (tRFC_MCB *p_rfc_mcb, UINT16 lcid);
extern void rfc_check_mcb_active (tRFC_MCB *p_mcb);
extern void rfc_port_closed (tPORT *p_port);
extern void rfc_sec_check_complete (BD_ADDR bd_addr, tBT_TRANSPORT transport,void *p_ref_data, UINT8 res);
extern void rfc_sec_check_complete (BD_ADDR bd_addr, tBT_TRANSPORT transport, void *p_ref_data, UINT8 res);
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);