1 /* 2 * Copyright (c) 2022 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. 14 */ 15 16 #ifndef APP_DEMO_HISTREAMING_H 17 #define APP_DEMO_HISTREAMING_H 18 19 #define UART_BUFF_SIZE 32 20 #define HIGH_NUM 2 21 #define HIGH_ASCII '9' 22 #define HIGH_NUM2 48 23 #define HIGH_NUM3 7 24 #define HIGH_NUM4 4 25 26 typedef enum { 27 UART_RECEIVE_FLAG = 0, 28 UART_RECVIVE_LEN, 29 UART_SEND_FLAG = 2, 30 UART_SEND_LEN 31 }UartDefType; 32 33 typedef enum { 34 UART_RECV_TRUE = 0, 35 UART_RECV_FALSE, 36 }UartRecvDef; 37 38 typedef struct { 39 unsigned int uartChannel; 40 unsigned char g_receiveUartBuff[UART_BUFF_SIZE]; 41 int g_uartReceiveFlag; 42 int g_uartLen; 43 }UartDefConfig; 44 45 void *HistreamingOpen(void); 46 void HistreamingClose(const char *link); 47 int SetUartRecvFlag(UartRecvDef def); 48 int GetUartConfig(UartDefType type); 49 void ResetUartReceiveMsg(void); 50 unsigned char *GetUartReceiveMsg(void); 51 52 #endif