Yann Gautier | 4518c59 | 2018-11-15 09:51:06 +0100 | [diff] [blame] | 1 | /* |
| 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 Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 10 | #include <drivers/console.h> |
Yann Gautier | 4518c59 | 2018-11-15 09:51:06 +0100 | [diff] [blame] | 11 | |
Julius Werner | 53456fc | 2019-07-09 13:49:11 -0700 | [diff] [blame] | 12 | #ifndef __ASSEMBLER__ |
Yann Gautier | 4518c59 | 2018-11-15 09:51:06 +0100 | [diff] [blame] | 13 | |
| 14 | #include <stdint.h> |
| 15 | |
Yann Gautier | 4518c59 | 2018-11-15 09:51:06 +0100 | [diff] [blame] | 16 | /* |
| 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 | */ |
| 22 | int console_stm32_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud, |
Andre Przywara | 678c6fa | 2020-01-25 00:58:35 +0000 | [diff] [blame] | 23 | console_t *console); |
Yann Gautier | 4518c59 | 2018-11-15 09:51:06 +0100 | [diff] [blame] | 24 | |
Julius Werner | 53456fc | 2019-07-09 13:49:11 -0700 | [diff] [blame] | 25 | #endif /*__ASSEMBLER__*/ |
Yann Gautier | 4518c59 | 2018-11-15 09:51:06 +0100 | [diff] [blame] | 26 | |
| 27 | #endif /* STM32_CONSOLE_H */ |