1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef UART_DEV_SAMPLE_H 10 #define UART_DEV_SAMPLE_H 11 12 #include "sys/ioctl.h" 13 #include "uart_core.h" 14 15 #ifdef __cplusplus 16 #if __cplusplus 17 extern "C" { 18 #endif /* __cplusplus */ 19 #endif /* __cplusplus */ 20 21 #define UART_IOC_MAGIC 'u' 22 23 /* baudrate config */ 24 #define UART_CFG_BAUDRATE _IO(UART_IOC_MAGIC, 1) 25 26 void AddUartDevice(struct UartHost *host); 27 void RemoveUartDevice(struct UartHost *host); 28 29 #ifdef __cplusplus 30 #if __cplusplus 31 } 32 #endif /* __cplusplus */ 33 #endif /* __cplusplus */ 34 35 #endif /* UART_DEV_SAMPLE_H */ 36