xref: /arm-trusted-firmware/include/drivers/st/stm32_console.h (revision 91f16700b400a8c0651d24a598fc48ee2997a0d7)
1*91f16700Schasinglulu /*
2*91f16700Schasinglulu  * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3*91f16700Schasinglulu  *
4*91f16700Schasinglulu  * SPDX-License-Identifier: BSD-3-Clause
5*91f16700Schasinglulu  */
6*91f16700Schasinglulu 
7*91f16700Schasinglulu #ifndef STM32_CONSOLE_H
8*91f16700Schasinglulu #define STM32_CONSOLE_H
9*91f16700Schasinglulu 
10*91f16700Schasinglulu #include <drivers/console.h>
11*91f16700Schasinglulu 
12*91f16700Schasinglulu #ifndef __ASSEMBLER__
13*91f16700Schasinglulu 
14*91f16700Schasinglulu #include <stdint.h>
15*91f16700Schasinglulu 
16*91f16700Schasinglulu /*
17*91f16700Schasinglulu  * Initialize a new STM32 console instance and register it with the console
18*91f16700Schasinglulu  * framework. The |console| pointer must point to storage that will be valid
19*91f16700Schasinglulu  * for the lifetime of the console, such as a global or static local variable.
20*91f16700Schasinglulu  * Its contents will be reinitialized from scratch.
21*91f16700Schasinglulu  */
22*91f16700Schasinglulu int console_stm32_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
23*91f16700Schasinglulu 			   console_t *console);
24*91f16700Schasinglulu 
25*91f16700Schasinglulu #endif /*__ASSEMBLER__*/
26*91f16700Schasinglulu 
27*91f16700Schasinglulu #endif /* STM32_CONSOLE_H */
28