SatCat5
satcat5::port::SerialAuto Class Reference

Detailed Description

Driver for "port_serial_auto.vhd".

Definition at line 49 of file port_serial.h.

#include <port_serial.h>

Inheritance diagram for satcat5::port::SerialAuto:
[legend]
Collaboration diagram for satcat5::port::SerialAuto:
[legend]

Public Member Functions

void config_mode (u8 mode)
 Manually select auto/SPI/UART mode. More...
 
void config_spi (u8 mode, u8 gfilt=1)
 Set the SPI clock mode (0/1/2/3) and glitch-filter parameters.
 
void config_uart (unsigned baud, bool ignore_cts=false)
 Set the UART baud rate and flow-control options.
 
u8 read_mode ()
 Report the current mode (auto/SPI/UART). More...
 
 SerialGeneric (satcat5::cfg::ConfigBus *cfg, unsigned devaddr)
 Link this object to a specific ConfigBus address.
 
u8 status ()
 Read the port-status register. More...
 

Static Public Attributes

static constexpr u8 MODE_AUTO = 0
 Constants for config_mode() and read_mode().
 
static constexpr u8 MODE_SPI = 1
 Constants for config_mode() and read_mode().
 
static constexpr u8 MODE_UART1 = 2
 Constants for config_mode() and read_mode().
 
static constexpr u8 MODE_UART2 = 3
 Constants for config_mode() and read_mode().
 

Protected Attributes

satcat5::cfg::Register m_ctrl
 

Member Function Documentation

◆ config_mode()

void satcat5::port::SerialAuto::config_mode ( u8  mode)

Manually select auto/SPI/UART mode.

See also
MODE_AUTO, MODE_SPI, MODE_UART1, MODE_UART2.

Definition at line 60 of file port_serial.cc.

◆ read_mode()

u8 satcat5::port::SerialAuto::read_mode ( )

Report the current mode (auto/SPI/UART).

See also
config_mode.

Definition at line 73 of file port_serial.cc.

◆ status()

u8 satcat5::port::SerialGeneric::status ( )
inherited

Read the port-status register.

Interpretation varies by port type; see VHDL comments.

Definition at line 56 of file port_serial.cc.


The documentation for this class was generated from the following files: