USB EPROM/Flash Programmer
Public Member Functions | List of all members
DataBus Class Reference

Data Bus Class. More...

#include <bus.hpp>

Public Member Functions

 DataBus ()
 Constructor. More...
 
 DataBus (const DataBusConfig &config)
 Constructor. More...
 
 ~DataBus ()
 Destructor. More...
 
void configure (const DataBusConfig &config)
 Configures the Data Bus. More...
 
DataBusConfig getConfig () const
 Gets the current configuration data. More...
 
bool writeByte (uint8_t value)
 Writes a byte to the Data Bus. More...
 
bool writeWord (uint16_t value)
 Writes a word to the Data Bus. More...
 
uint8_t readByte (void)
 Reads a byte from the Data Bus. More...
 
uint16_t readWord (void)
 Reads a word from the Data Bus. More...
 

Detailed Description

Data Bus Class.

The purpose of this class is to provide the methods to manipulate a Data Bus Module.

Constructor & Destructor Documentation

◆ DataBus() [1/2]

DataBus ( )

Constructor.

Assumes a default value for the configuration.

◆ DataBus() [2/2]

DataBus ( const DataBusConfig config)
explicit

Constructor.

Parameters
configConfiguration data.

◆ ~DataBus()

~DataBus ( )

Destructor.

Member Function Documentation

◆ configure()

void configure ( const DataBusConfig config)

Configures the Data Bus.

Parameters
configConfiguration data.

◆ getConfig()

DataBusConfig getConfig ( ) const

Gets the current configuration data.

Returns
Copy of the current configuration data.

◆ writeByte()

bool writeByte ( uint8_t  value)

Writes a byte to the Data Bus.

Parameters
valueValue to write.
Returns
True if success. False otherwise.

◆ writeWord()

bool writeWord ( uint16_t  value)

Writes a word to the Data Bus.

Parameters
valueValue to write.
Returns
True if success. False otherwise.

◆ readByte()

uint8_t readByte ( void  )

Reads a byte from the Data Bus.

Returns
Readed value or 0 if an error occurs.

◆ readWord()

uint16_t readWord ( void  )

Reads a word from the Data Bus.

Returns
Readed value or 0 if an error occurs.

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