openMSX
Public Types | Public Member Functions | Static Public Attributes | List of all members
openmsx::EEPROM_93C46 Class Reference

#include <EEPROM_93C46.hh>

Public Types

enum class  State {
  IN_RESET , WAIT_FOR_START_BIT , WAIT_FOR_COMMAND , READING_DATA ,
  WAIT_FOR_WRITE , WAIT_FOR_WRITE_ALL
}
 

Public Member Functions

 EEPROM_93C46 (const XMLElement &xml)
 
 EEPROM_93C46 (const std::string &name, const DeviceConfig &config)
 
void reset ()
 
bool read_DO (EmuTime::param time) const
 
void write_CS (bool value, EmuTime::param time)
 
void write_CLK (bool value, EmuTime::param time)
 
void write_DI (bool value, EmuTime::param time)
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 
const uint8_t * backdoor () const
 

Static Public Attributes

static constexpr uint8_t ADDRESS_BITS = 7
 
static constexpr uint32_t NUM_ADDRESSES = 1 << ADDRESS_BITS
 
static constexpr uint32_t ADDRESS_MASK = NUM_ADDRESSES - 1
 
static constexpr uint8_t DATA_BITS = 8
 

Detailed Description

Definition at line 15 of file EEPROM_93C46.hh.

Member Enumeration Documentation

◆ State

enum class openmsx::EEPROM_93C46::State
strong
Enumerator
IN_RESET 
WAIT_FOR_START_BIT 
WAIT_FOR_COMMAND 
READING_DATA 
WAIT_FOR_WRITE 
WAIT_FOR_WRITE_ALL 

Definition at line 54 of file EEPROM_93C46.hh.

Constructor & Destructor Documentation

◆ EEPROM_93C46() [1/2]

openmsx::EEPROM_93C46::EEPROM_93C46 ( const XMLElement xml)
explicit

Definition at line 7 of file EEPROM_93C46.cc.

◆ EEPROM_93C46() [2/2]

openmsx::EEPROM_93C46::EEPROM_93C46 ( const std::string &  name,
const DeviceConfig config 
)

Definition at line 12 of file EEPROM_93C46.cc.

Member Function Documentation

◆ backdoor()

const uint8_t * openmsx::EEPROM_93C46::backdoor ( ) const
inline

Definition at line 38 of file EEPROM_93C46.hh.

Referenced by TEST_CASE().

◆ read_DO()

bool openmsx::EEPROM_93C46::read_DO ( EmuTime::param  time) const

Definition at line 66 of file EEPROM_93C46.cc.

References READING_DATA, and WAIT_FOR_START_BIT.

◆ reset()

void openmsx::EEPROM_93C46::reset ( )

Definition at line 17 of file EEPROM_93C46.cc.

References IN_RESET.

◆ serialize()

template<typename Archive >
void openmsx::EEPROM_93C46::serialize ( Archive &  ar,
unsigned  version 
)

Definition at line 241 of file EEPROM_93C46.cc.

◆ write_CLK()

void openmsx::EEPROM_93C46::write_CLK ( bool  value,
EmuTime::param  time 
)

Definition at line 92 of file EEPROM_93C46.cc.

◆ write_CS()

void openmsx::EEPROM_93C46::write_CS ( bool  value,
EmuTime::param  time 
)

Definition at line 77 of file EEPROM_93C46.cc.

References IN_RESET, and WAIT_FOR_START_BIT.

◆ write_DI()

void openmsx::EEPROM_93C46::write_DI ( bool  value,
EmuTime::param  time 
)

Definition at line 102 of file EEPROM_93C46.cc.

Member Data Documentation

◆ ADDRESS_BITS

constexpr uint8_t openmsx::EEPROM_93C46::ADDRESS_BITS = 7
staticconstexpr

Definition at line 18 of file EEPROM_93C46.hh.

◆ ADDRESS_MASK

constexpr uint32_t openmsx::EEPROM_93C46::ADDRESS_MASK = NUM_ADDRESSES - 1
staticconstexpr

Definition at line 20 of file EEPROM_93C46.hh.

◆ DATA_BITS

constexpr uint8_t openmsx::EEPROM_93C46::DATA_BITS = 8
staticconstexpr

Definition at line 21 of file EEPROM_93C46.hh.

◆ NUM_ADDRESSES

constexpr uint32_t openmsx::EEPROM_93C46::NUM_ADDRESSES = 1 << ADDRESS_BITS
staticconstexpr

Definition at line 19 of file EEPROM_93C46.hh.

Referenced by TEST_CASE().


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