blob: 8d9187d2ad73f1e64e170af7d9c25093bf2187d9 [file] [log] [blame]
Yann Gautier4518c592018-11-15 09:51:06 +01001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef STM32_CONSOLE_H
8#define STM32_CONSOLE_H
9
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000010#include <drivers/console.h>
Yann Gautier4518c592018-11-15 09:51:06 +010011
Julius Werner53456fc2019-07-09 13:49:11 -070012#ifndef __ASSEMBLER__
Yann Gautier4518c592018-11-15 09:51:06 +010013
14#include <stdint.h>
15
Yann Gautier4518c592018-11-15 09:51:06 +010016/*
17 * Initialize a new STM32 console instance and register it with the console
18 * framework. The |console| pointer must point to storage that will be valid
19 * for the lifetime of the console, such as a global or static local variable.
20 * Its contents will be reinitialized from scratch.
21 */
22int console_stm32_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
Andre Przywara678c6fa2020-01-25 00:58:35 +000023 console_t *console);
Yann Gautier4518c592018-11-15 09:51:06 +010024
Julius Werner53456fc2019-07-09 13:49:11 -070025#endif /*__ASSEMBLER__*/
Yann Gautier4518c592018-11-15 09:51:06 +010026
27#endif /* STM32_CONSOLE_H */