comparison src/cs/services/atp/atp_spp_api.h @ 0:b6a5e36de839

src/cs: initial import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Jul 2018 04:39:26 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b6a5e36de839
1 /*******************************************************************************
2 *
3 * File Name : atp_spp_api.h
4 *
5 * Definitions for the interface between ATP and SPP SW entity
6 *
7 * (C) Texas Instruments, all rights reserved
8 *
9 * Version number : 0.1 Date : 16-Marsh-2000
10 *
11 * History : 0.1 - Created by E. Baissus
12 *
13 *
14 * Author : Eric Baissus : e-baissus@ti.com
15 *
16 * (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved
17 ******************************************************************************/
18 #ifndef ATP_SPP_API_H
19 #define ATP_SPP_API_H
20
21
22 #include "rv/rv_general.h"
23 #include "rvf/rvf_api.h"
24 #include "l2cap_gen.h"
25 #include "spp_general.h"
26 #include "atp/atp_api.h"
27
28 #define SPP_ALL_THE_EVENTS (0xFF)
29 #define SPP_RX_HEAD_SIZE (SPP_TX_OFFSET)
30 #define SPP_RX_TRAIL_SIZE (SPP_TX_LENGTH-(SPP_TX_OFFSET))
31
32
33 /* Types and definition used between ATP and SPP */
34 typedef enum
35 {
36 ATP_IS_SERVER,
37 ATP_IS_CLIENT
38 } T_ATP_IS_SERVER;
39
40
41 /* Custom information used during a new open port request to spp */
42 typedef enum
43 {
44 ATP_PAYLOAD_LENGTH_RENEG_ON,
45 ATP_PAYLOAD_LENGTH_RENEG_OFF
46 } T_ATP_PAYLOAD_LENTH_RENEG_EN;
47
48 typedef enum
49 {
50 ATP_AUTOMATIC_FLOW_CTRL_ON,
51 ATP_AUTOMATIC_FLOW_CTRL_OFF
52 } T_ATP_SPP_FLOW_CONTROL_MODE;
53
54 typedef struct
55 {
56 T_ATP_CUSTOM_TYPE custom_type;
57 T_BD_ADDR bd_addr;
58 UINT16 server_channel;
59 UINT16 max_payload_length; // max = 32 KBytes
60 T_ATP_PAYLOAD_LENTH_RENEG_EN max_payload_length_reneg_en;
61 T_RVF_MB_ID rx_mb;
62 T_ATP_SPP_FLOW_CONTROL_MODE flow_ctrl_mode;
63 T_ATP_IS_SERVER is_server;
64 } T_ATP_CUSTOM_TO_SPP_INFO;
65
66 /* Custom information used during a new open port response by spp */
67 typedef struct
68 {
69 T_ATP_CUSTOM_TYPE custom_type;
70 T_BD_ADDR bd_addr;
71 UINT16 max_payload_length;
72 } T_ATP_CUSTOM_FROM_SPP_INFO;
73
74 /* Custom Commands exchanged with SPP : see atp_send_cmd and ATP_CMD_RDY definitions*/
75 #define ATP_FROM_SPP_MAX_PAYLOAD_IND_CMD (0) // custom info is the payload value (UINT32)
76 #define ATP_FROM_SPP_REG_SERVER_ERROR (1) // No custom info
77
78
79 extern T_RV_RET atp_spp_init(T_RVF_ADDR_ID addr_id, T_RVF_MB_ID mb_id);
80 extern T_RV_RET atp_spp_start(void);
81
82 #endif
83