• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
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. \n
14  *
15  * Description: Provides at channel service header. Only for AT module. \n
16  */
17 
18 #ifndef    AT_CHANNEL_H
19 #define    AT_CHANNEL_H
20 
21 #include "at_product.h"
22 
23 typedef enum {
24     AT_CHANNEL_UNINITIALIZED = 0x0,
25     AT_CHANNEL_FREE,
26     AT_CHANNEL_INTERACTIVITY,
27     AT_CHANNEL_BLOCK
28 } at_channel_state_t;
29 
30 at_write_func_t at_channel_get_write_func(at_channel_id_t id);
31 
32 void at_channel_check_and_enable(void);
33 
34 uint8_t* at_channel_get_data(at_channel_id_t id);
35 
36 void at_channel_data_reset(at_channel_id_t id);
37 
38 void at_channel_set_state(at_channel_id_t id, at_channel_state_t state);
39 
40 void at_channel_data_wait_interactivity(at_channel_id_t id);
41 
42 #endif
43