• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 GOODIX.
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 __UART_H
17 #define __UART_H
18 
19 #include "los_event.h"
20 #include "los_compiler.h"
21 #include "app_io.h"
22 #include "app_uart.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #define LOG_UART_ID                     APP_UART_ID_0
29 #define LOG_UART_BAUDRATE               115200
30 #define LOG_UART_TX_IO_TYPE             APP_IO_TYPE_NORMAL
31 #define LOG_UART_RX_IO_TYPE             APP_IO_TYPE_NORMAL
32 #define LOG_UART_TX_PIN                 APP_IO_PIN_10
33 #define LOG_UART_RX_PIN                 APP_IO_PIN_11
34 #define LOG_UART_TX_PINMUX              APP_IO_MUX_2
35 #define LOG_UART_RX_PINMUX              APP_IO_MUX_2
36 #define LOG_UART_TX_PULL                APP_IO_PULLUP
37 #define LOG_UART_RX_PULL                APP_IO_PULLUP
38 
39 /**< Size of app uart tx buffer. */
40 #define UART_TX_BUFF_SIZE               0x2000
41 
42 extern EVENT_CB_S g_shellInputEvent;
43 
44 void bsp_log_init(void);
45 uint8_t UartGetc(void);
46 void _putchar(char character);
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif /* __UART_H */
53