#include <ring.h>
#include <stddef.h>


Go to the source code of this file.
Data Structures | |
| struct | console_buffer |
| Buffer holding input or output data for a console. More... | |
| struct | console_driver |
| A console driver. More... | |
Defines | |
| #define | CONSOLE_BUF_SIZE 64 |
| The size of the console ring buffer in bytes. | |
Functions | |
| static void | console_buf_insert_char (struct console_buffer *buf, char c) |
| Add a character to the console ring buffer. | |
| static char | console_buf_extract_char (struct console_buffer *buf) |
| Extract a character from the console ring buffer. | |
| static unsigned long | console_buf_unused (struct console_buffer *buf) |
| Get the number of unused character slots in the console ring buffer. | |
| static unsigned long | console_buf_unused_before_end (struct console_buffer *buf) |
| Get the number of unused character slots in the console ring buffer before it wraps. | |
| static unsigned long | console_buf_used (struct console_buffer *buf) |
| Get the number of used character slots in the console ring buffer. | |
Definition in file driver.h.
| #define CONSOLE_BUF_SIZE 64 |
The size of the console ring buffer in bytes.
Definition at line 50 of file driver.h.
Referenced by console_buf_extract_char(), console_buf_insert_char(), console_buf_unused(), console_buf_unused_before_end(), console_buf_used(), and console_drv_write().
| static char console_buf_extract_char | ( | struct console_buffer * | buf | ) | [inline, static] |
Extract a character from the console ring buffer.
Definition at line 84 of file driver.h.
References CONSOLE_BUF_SIZE, console_buffer::data, console_buffer::ring, ring_extract_entries(), ring_get_tail(), and ring_head::tail.

| static void console_buf_insert_char | ( | struct console_buffer * | buf, | |
| char | c | |||
| ) | [inline, static] |
Add a character to the console ring buffer.
Definition at line 70 of file driver.h.
References CONSOLE_BUF_SIZE, console_buffer::data, console_buffer::ring, ring_get_head(), and ring_insert_entries().
Referenced by console_drv_putchar().

| static unsigned long console_buf_unused | ( | struct console_buffer * | buf | ) | [inline, static] |
Get the number of unused character slots in the console ring buffer.
Definition at line 99 of file driver.h.
References CONSOLE_BUF_SIZE, console_buffer::ring, and ring_entries_unused().
Referenced by console_drv_putchar(), and console_drv_write().

| static unsigned long console_buf_unused_before_end | ( | struct console_buffer * | buf | ) | [inline, static] |
Get the number of unused character slots in the console ring buffer before it wraps.
Definition at line 112 of file driver.h.
References CONSOLE_BUF_SIZE, console_buffer::ring, and ring_entries_unused_before_end().
Referenced by console_drv_write().

| static unsigned long console_buf_used | ( | struct console_buffer * | buf | ) | [inline, static] |
Get the number of used character slots in the console ring buffer.
Definition at line 126 of file driver.h.
References CONSOLE_BUF_SIZE, console_buffer::ring, and ring_entries_used().

1.5.8