SSD1306 OLED display driver 1.7.8 This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays

Macros | Functions
ssd1306_uart.h File Reference
`#include <stdint.h>`

Go to the source code of this file.

## Macros
#define | UART_BUFFER_RX 32

## Functions
static void | uart_init (uint32_t baud)
| Initializes uart module. More...
void | uart_send_byte (uint8_t c)
| Sends single byte over UART. More...
uint8_t | uart_byte_available (void)
| Returns non-zero code if there are bytes in RX buffer. More...
uint8_t | uart_read_byte (void)
| Reads byte from UART RX buffer. More...

## Detailed Description

Uart implementation for SSD1306 library

Define UART_INTERRUPT_ENABLE before including this header, if you want interrupt-based UART support. Define CONFIG_AVR_UART_AVAILABLE and CONFIG_AVR_UART_ENABLE before including this header, if you want to use uart module outside ssd1306 library.

Definition in file ssd1306_uart.h.

## Macro Definition Documentation

## ◆ UART_BUFFER_RX

#define UART_BUFFER_RX 32

Rx buffer size, used by AVR USART implementation

Definition at line 49 of file ssd1306_uart.h.

## Function Documentation

## ◆ uart_byte_available()

uint8_t uart_byte_available | ( | void |  | ) |

Returns non-zero code if there are bytes in RX buffer.

Returns non-zero code if there are bytes in RX buffer

Definition at line 128 of file ssd1306_uart.c.

## ◆ uart_init()

static void uart_init | ( | uint32_t | baud | ) |
| inline static

Initializes uart module.

Initializes uart module. Depending on UART_INTERRUPT_ENABLE define, module will be initialized in interrupt mode or synchronouse mode.

Parameters

  baud | baud rate for the uart module

Note
  only 115200, 57600, 38400 and 19200 are supported.

Definition at line 68 of file ssd1306_uart.h.

## ◆ uart_read_byte()

uint8_t uart_read_byte | ( | void |  | ) |

Reads byte from UART RX buffer.

Reads byte from UART RX buffer. Please, check bytes availability via uart_byte_available() before calling this function.

Definition at line 137 of file ssd1306_uart.c.

## ◆ uart_send_byte()

void uart_send_byte | ( | uint8_t | c | ) |

Sends single byte over UART.

Sends single byte over UART. The function doesn't use any internal buffers, so it returns control once byte is sent.

Parameters

  c | byte to send.

Definition at line 117 of file ssd1306_uart.c.