1 /*
2  * Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef UART_BACKEND_H
8 #define UART_BACKEND_H
9 
10 #include <service/log/backend/log_backend.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 /**
17  * \brief Initialize the UART based backend
18  *
19  * Initializes an UART backend that uses the interface provided by the
20  * UART adapter to execute UART operations.
21  *
22  * \param[in] uart_instance_num  The UART hardware instance number to use
23  *
24  * \return PSA_SUCCESS if backend initialized successfully
25  */
26 struct log_backend *uart_backend_init(int uart_instance_num);
27 
28 /**
29  * \brief Clean-up to free any resource used by the backend
30  */
31 void uart_backend_deinit(void);
32 
33 #ifdef __cplusplus
34 } /* extern "C" */
35 #endif
36 
37 #endif /* UART_BACKEND_H */
38