HomeCore 0.1.3 (07b5544)
Bare-metal personal computer firmware for Cortex-M
Loading...
Searching...
No Matches
console_ops_t Struct Reference

Console operations a serial driver provides. More...

#include <homecore/drivers/console.h>

Data Fields

void(* putc )(void *device, char c)
 Write one byte, polling while the transmitter is busy.
 
int(* getc )(void *device)
 Read one byte from the receive buffer, sleeping until one arrives; returns 0 to 255.
 
int(* has_data )(void *device)
 Return nonzero if a received byte is buffered.
 
void(* flush )(void *device)
 Wait until every written byte has left the transmitter.
 
bool(* ready )(void *device)
 Return true once the device is initialized.
 

Detailed Description

Console operations a serial driver provides.

Field Documentation

◆ putc

void(* console_ops_t::putc) (void *device, char c)

Write one byte, polling while the transmitter is busy.

Usable with interrupts masked.

◆ getc

int(* console_ops_t::getc) (void *device)

Read one byte from the receive buffer, sleeping until one arrives; returns 0 to 255.

Needs interrupts enabled, because the receive interrupt fills the buffer.


The documentation for this struct was generated from the following file: