• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Bestechnic (Shanghai) Co., 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 __COMMUNICATION_SVR_H__
16 #define __COMMUNICATION_SVR_H__
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 
23 typedef void (*communication_receive_func_typedef)(uint8_t *buf, uint8_t len);
24 
25 void communication_init(void);
26 int communication_receive_register_callback(communication_receive_func_typedef p);
27 int communication_send_buf(uint8_t * buf, uint8_t len);
28 
29 void communication_enable_irq(void (* irq_cb)(enum HAL_GPIO_PIN_T pin));
30 
31 void communication_disable_irq(void);
32 
33 
34 #ifdef KNOWLES_UART_DATA
35 void uart_audio_init();
36 void uart_audio_deinit();
37 #endif
38 
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 #endif
45 
46