[sw] Move printf-like facilities into libbase.
|printf|-like functions simply move bytes around in a fancy way, and
having them accessible everywhere is probably useful.
As #1162 is addressed, we will see if we can use some link-time
mechanism to more effectively control the "default" sink used by
|base_printf()|.
Signed-off-by: Miguel Young de la Sota <mcyoung@google.com>
diff --git a/sw/device/lib/uart.h b/sw/device/lib/uart.h
index 7a6fe3f..c35ab9b 100644
--- a/sw/device/lib/uart.h
+++ b/sw/device/lib/uart.h
@@ -5,8 +5,11 @@
#ifndef OPENTITAN_SW_DEVICE_LIB_UART_H_
#define OPENTITAN_SW_DEVICE_LIB_UART_H_
+#include <stddef.h>
#include <stdint.h>
+#include "sw/device/lib/base/print.h"
+
void uart_send_char(char c);
/**
@@ -20,6 +23,8 @@
*/
void uart_send_str(char *str);
+extern const buffer_sink_t uart_stdout;
+
/**
* Receive a single character from UART
*