coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
uart_bitbang.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <console/uart.h>
4 #include <gpio.h>
5 #include <boot/coreboot_tables.h>
6 #include <soc/uart.h>
7 
8 void uart_fill_lb(void *data)
9 {
10 
11 }
12 
13 static void set_tx(int line_state)
14 {
15  gpio_set(UART_TX_PIN, line_state);
16 }
17 
18 void uart_init(unsigned int idx)
19 {
21 }
22 
23 void uart_tx_byte(unsigned int idx, unsigned char data)
24 {
26 }
27 
28 void uart_tx_flush(unsigned int idx)
29 {
30  /* unnecessary, PIO Tx means transaction is over when tx_byte returns */
31 }
32 
33 unsigned char uart_rx_byte(unsigned int idx)
34 {
35  return 0; /* not implemented */
36 }
void uart_bitbang_tx_byte(unsigned char data, void(*set_tx)(int line_state))
Definition: util.c:48
void gpio_output(gpio_t gpio, int value)
Definition: gpio.c:194
void gpio_set(gpio_t gpio, int value)
Definition: gpio.c:174
#define UART_TX_PIN
Definition: uart.h:6
static void set_tx(int line_state)
Definition: uart_bitbang.c:13
void uart_init(unsigned int idx)
Definition: uart_bitbang.c:18
void uart_tx_flush(unsigned int idx)
Definition: uart_bitbang.c:28
unsigned char uart_rx_byte(unsigned int idx)
Definition: uart_bitbang.c:33
void uart_fill_lb(void *data)
Definition: uart_bitbang.c:8
void uart_tx_byte(unsigned int idx, unsigned char data)
Definition: uart_bitbang.c:23