1 #ifndef RWIP_TASK_H_
2 #define RWIP_TASK_H_
3 
4 /**
5  ****************************************************************************************
6  * @addtogroup ROOT
7  * @{
8  *
9  *  Information about RW SW TASK
10  *
11  * @name RW TASK Configuration
12  * @{
13  ****************************************************************************************
14  */
15 
16 #include <stdint.h>
17 
18 /*
19  * DEFINES
20  ****************************************************************************************
21  */
22 
23 
24 /// Build the first message ID of a task. (in fact a ke_msg_id_t)
25 #define TASK_FIRST_MSG(task) ((uint16_t)((task) << 8))
26 
27 /// Builds the task identifier from the type and the index of that task.
28 #define TASK_BUILD(type, index) ((uint16_t)(((index) << 8)|(type)) )
29 
30 /// Retrieves task type from task id.
31 #define TASK_TYPE_GET(ke_task_id) ((uint16_t) & 0xFF)
32 
33 /// Retrieves task index number from task id.
34 #define TASK_IDX_GET(ke_task_id) (((uint16_t) >> 8) & 0xFF)
35 
36 
37 /// Tasks types definition, this value shall be in [0-254] range
38 enum TASK_API_ID
39 {
40     // Link Layer Tasks
41     TASK_ID_LLM          = 0,
42     TASK_ID_LLC          = 1,
43     TASK_ID_LLD          = 2,
44     TASK_ID_DBG          = 3,
45 
46     // BT Controller Tasks
47     TASK_ID_LM           = 4,
48     TASK_ID_LC           = 5,
49     TASK_ID_LB           = 6,
50     TASK_ID_LD           = 7,
51 
52     TASK_ID_HCI          = 8,
53     TASK_ID_DISPLAY      = 9,
54 
55     // -----------------------------------------------------------------------------------
56     // --------------------- BLE HL TASK API Identifiers ---------------------------------
57     // -----------------------------------------------------------------------------------
58 
59     TASK_ID_L2CC         = 10,   // L2CAP Controller Task
60     TASK_ID_GATTM        = 11,   // Generic Attribute Profile Manager Task
61     TASK_ID_GATTC        = 12,   // Generic Attribute Profile Controller Task
62     TASK_ID_GAPM         = 13,   // Generic Access Profile Manager
63     TASK_ID_GAPC         = 14,   // Generic Access Profile Controller
64 
65     TASK_ID_APP          = 15,   // Application API
66     TASK_ID_AHI          = 16,   // Application Host Interface
67 
68     // -----------------------------------------------------------------------------------
69     // --------------------- BLE Profile TASK API Identifiers ----------------------------
70     // -----------------------------------------------------------------------------------
71     TASK_ID_DISS         = 20,   // Device Information Service Server Task
72     TASK_ID_DISC         = 21,   // Device Information Service Client Task
73 
74     TASK_ID_PROXM        = 22,   // Proximity Monitor Task
75     TASK_ID_PROXR        = 23,   // Proximity Reporter Task
76 
77     TASK_ID_FINDL        = 24,   // Find Me Locator Task
78     TASK_ID_FINDT        = 25,   // Find Me Target Task
79 
80     TASK_ID_HTPC         = 26,   // Health Thermometer Collector Task
81     TASK_ID_HTPT         = 27,   // Health Thermometer Sensor Task
82 
83     TASK_ID_BLPS         = 28,   // Blood Pressure Sensor Task
84     TASK_ID_BLPC         = 29,   // Blood Pressure Collector Task
85 
86     TASK_ID_HRPS         = 30,   // Heart Rate Sensor Task
87     TASK_ID_HRPC         = 31,   // Heart Rate Collector Task
88 
89     TASK_ID_TIPS         = 32,   // Time Server Task
90     TASK_ID_TIPC         = 33,   // Time Client Task
91 
92     TASK_ID_SCPPS        = 34,   // Scan Parameter Profile Server Task
93     TASK_ID_SCPPC        = 35,   // Scan Parameter Profile Client Task
94 
95     TASK_ID_BASS         = 36,   // Battery Service Server Task
96     TASK_ID_BASC         = 37,   // Battery Service Client Task
97 
98     TASK_ID_HOGPD        = 38,   // HID Device Task
99     TASK_ID_HOGPBH       = 39,   // HID Boot Host Task
100     TASK_ID_HOGPRH       = 40,   // HID Report Host Task
101 
102     TASK_ID_GLPS         = 41,   // Glucose Profile Sensor Task
103     TASK_ID_GLPC         = 42,   // Glucose Profile Collector Task
104 
105     TASK_ID_RSCPS        = 43,   // Running Speed and Cadence Profile Server Task
106     TASK_ID_RSCPC        = 44,   // Running Speed and Cadence Profile Collector Task
107 
108     TASK_ID_CSCPS        = 45,   // Cycling Speed and Cadence Profile Server Task
109     TASK_ID_CSCPC        = 46,   // Cycling Speed and Cadence Profile Client Task
110 
111     TASK_ID_ANPS         = 47,   // Alert Notification Profile Server Task
112     TASK_ID_ANPC         = 48,   // Alert Notification Profile Client Task
113 
114     TASK_ID_PASPS        = 49,   // Phone Alert Status Profile Server Task
115     TASK_ID_PASPC        = 50,   // Phone Alert Status Profile Client Task
116 
117     TASK_ID_CPPS         = 51,   // Cycling Power Profile Server Task
118     TASK_ID_CPPC         = 52,   // Cycling Power Profile Client Task
119 
120     TASK_ID_LANS         = 53,   // Location and Navigation Profile Server Task
121     TASK_ID_LANC         = 54,   // Location and Navigation Profile Client Task
122 
123     TASK_ID_IPSS         = 55,   // Internet Protocol Support Profile Server Task
124     TASK_ID_IPSC         = 56,   // Internet Protocol Support Profile Client Task
125 
126     TASK_ID_ENVS         = 57,   // Environmental Sensing Profile Server Task
127     TASK_ID_ENVC         = 58,   // Environmental Sensing Profile Client Task
128 
129     TASK_ID_WSCS         = 59,   // Weight Scale Profile Server Task
130     TASK_ID_WSCC         = 60,   // Weight Scale Profile Client Task
131 
132     TASK_ID_UDSS         = 61,   // User Data Service Server Task
133     TASK_ID_UDSC         = 62,   // User Data Service Client Task
134 
135     TASK_ID_BCSS         = 63,   // Body Composition Server Task
136     TASK_ID_BCSC         = 64,   // Body Composition Client Task
137 
138     TASK_ID_GFPSP        = 65,   //google fast pair service provider
139     TASK_ID_GFPSS        = 66,   // seeker
140 
141     TASK_ID_VOICEPATH    = 67,   // Voice Path Task
142 
143     TASK_ID_OTA          = 68,   // OTA Task
144 
145     TASK_ID_ANCC         = 69,   // ANCS Client Task
146 
147     TASK_ID_AMSC         = 70,   // AMS Client Task
148 
149     TASK_ID_BMS          = 71,   // BMS Task
150 
151     TASK_ID_ANCSP        = 72,   // ANCS Proxy Task
152 
153     TASK_ID_AMSP         = 73,   // AMS Proxy Task
154 
155     TASK_ID_DATAPATHPS   = 74,   // Datapath Server Task
156 
157     TASK_ID_AI           = 75,   // ai Task
158 
159     TASK_ID_TOTA         = 76,   // TOTA Task
160 
161     TASK_ID_TILE         = 77,   // skull tile task
162 #ifdef USE_BT_ADAPTER
163     TASK_ID_BLE_ADAPTER_START = 80,
164     TASK_ID_BLE_ADAPTER_END = 80 + (BLE_ADAPTER_PROFILES_NUM - 1),
165     TASK_ID_BLE_ADAPTER_CLIENT,
166 #endif
167     /* 240 -> 241 reserved for Audio Mode 0 */
168     TASK_ID_AM0          = 240,  // BLE Audio Mode 0 Task
169     TASK_ID_AM0_HAS      = 241,  // BLE Audio Mode 0 Hearing Aid Service Task
170 
171     TASK_ID_INVALID      = 0xFF, // Invalid Task Identifier
172 };
173 
174 /// @} BT Stack Configuration
175 /// @} ROOT
176 
177 #endif //RWIP_CONFIG_H_
178