5 #ifndef OPENTITAN_SW_DEVICE_LIB_TESTING_TEST_FRAMEWORK_OTTF_CONSOLE_H_
6 #define OPENTITAN_SW_DEVICE_LIB_TESTING_TEST_FRAMEWORK_OTTF_CONSOLE_H_
10 #include "sw/device/lib/base/status.h"
16 typedef enum ottf_console_flow_control {
18 kOttfConsoleFlowControlNone = 0,
20 kOttfConsoleFlowControlAuto = 1,
25 kOttfConsoleFlowControlResume = 17,
30 kOttfConsoleFlowControlPause = 19,
31 } ottf_console_flow_control_t;
36 void *ottf_console_get(
void);
41 void ottf_console_init(
void);
48 void ottf_console_configure_uart(uintptr_t base_addr);
55 void ottf_console_configure_spi_device(uintptr_t base_addr);
64 status_t ottf_console_flow_control(
const dif_uart_t *uart,
65 ottf_console_flow_control_t ctrl);
78 void ottf_console_flow_control_enable(
void);
89 bool ottf_console_flow_control_isr(uint32_t *exc_info);
95 uint32_t ottf_console_get_flow_control_irqs(
void);
110 size_t ottf_console_spi_device_read(
size_t buf_size, uint8_t *
const buf);
120 status_t ottf_console_putbuf(
void *io,
const char *buf,
size_t len);
127 status_t ottf_console_getc(
void *io);