• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_IF_H
10 #define UART_IF_H
11 
12 #include <stdint.h>
13 
14 #define UART_DEV_SERVICE_NAME_PREFIX "HDF_PLATFORM_UART_%d"
15 #define MAX_DEV_NAME_SIZE 32
16 
17 enum {
18     UART_WRITE = 1
19 };
20 
21 struct DevHandle {
22     void *object;
23 };
24 
25 struct DevHandle *UartOpen(uint32_t port);
26 int32_t UartWrite(struct DevHandle *handle, uint8_t *data, uint32_t size);
27 void UartClose(struct DevHandle *handle);
28 
29 #endif // UART_IF_H