• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Chipsea Technologies (Shenzhen) Corp., Ltd. All rights reserved.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef _APP_PRESENT_TASK_H
16 #define _APP_PRESENT_TASK_H
17 
18 #include "ble_ip_config.h"             // SW configuration
19 
20 #if (BLE_APP_PRESENT)
21 
22 #include <stdint.h>         // Standard Integer
23 #include "ble_ip_task.h"      // Task definitions
24 #include "ble_ke_task.h"        // Kernel Task
25 
26 /*
27  * DEFINES
28  ****************************************************************************************
29  */
30 
31 /// Number of APP Task Instances
32 #define APP_IDX_MAX                 (1)
33 
34 /*
35  * ENUMERATIONS
36  ****************************************************************************************
37  */
38 
39 /// States of APP task
40 enum appm_state
41 {
42     /// Initialization state
43     APPM_INIT,
44     /// Database create state
45     APPM_CREATE_DB,
46     /// Ready State
47     APPM_READY,
48     /// Connected state
49     APPM_CONNECTED,
50 
51     /// Number of defined states.
52     APPM_STATE_MAX
53 };
54 
55 
56 /// APP Task messages
57 /*@TRACE*/
58 enum app_msg_id
59 {
60     APPM_DUMMY_MSG = TASK_FIRST_MSG(TASK_ID_APP),
61 
62     #if (BLE_APP_HT)
63     /// Timer used to refresh the temperature measurement value
64     APP_HT_MEAS_INTV_TIMER,
65     #endif //(BLE_APP_HT)
66 
67     #if (BLE_APP_HID)
68     /// Timer used to disconnect the moue if no activity is detecter
69     APP_HID_MOUSE_TIMEOUT_TIMER,
70     APP_HID_MOUSE_TEST_TIMER,
71     #endif //(BLE_APP_HID)
72     APP_TEST_TIMER,
73 };
74 
75 
76 /*
77  * GLOBAL VARIABLE DECLARATIONS
78  ****************************************************************************************
79  */
80 
81 #endif //(BLE_APP_PRESENT)
82 
83 #endif // _APP_PRESENT_TASK_H
84