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  State {
  IN_RESET, WAIT_FOR_START_BIT, WAIT_FOR_COMMAND, READING_DATA,
  WAIT_FOR_WRITE, WAIT_FOR_WRITEALL
}
 

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 14 of file EEPROM_93C46.hh.

Member Enumeration Documentation

◆ State

Enumerator
IN_RESET 
WAIT_FOR_START_BIT 
WAIT_FOR_COMMAND 
READING_DATA 
WAIT_FOR_WRITE 
WAIT_FOR_WRITEALL 

Definition at line 53 of file EEPROM_93C46.hh.

Constructor & Destructor Documentation

◆ EEPROM_93C46() [1/2]

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

Definition at line 6 of file EEPROM_93C46.cc.

◆ EEPROM_93C46() [2/2]

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

Definition at line 11 of file EEPROM_93C46.cc.

Member Function Documentation

◆ backdoor()

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

Definition at line 37 of file EEPROM_93C46.hh.

Referenced by TEST_CASE().

◆ read_DO()

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

Definition at line 65 of file EEPROM_93C46.cc.

References READING_DATA, and WAIT_FOR_START_BIT.

Referenced by openmsx::Carnivore2::writeMem().

◆ reset()

void openmsx::EEPROM_93C46::reset ( )

◆ serialize()

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

Definition at line 238 of file EEPROM_93C46.cc.

◆ write_CLK()

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

Definition at line 91 of file EEPROM_93C46.cc.

Referenced by openmsx::Carnivore2::writeMem().

◆ write_CS()

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

Definition at line 76 of file EEPROM_93C46.cc.

References IN_RESET, and WAIT_FOR_START_BIT.

Referenced by openmsx::Carnivore2::writeMem().

◆ write_DI()

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

Member Data Documentation

◆ ADDRESS_BITS

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

Definition at line 17 of file EEPROM_93C46.hh.

Referenced by write_DI().

◆ ADDRESS_MASK

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

Definition at line 19 of file EEPROM_93C46.hh.

Referenced by write_DI().

◆ DATA_BITS

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

Definition at line 20 of file EEPROM_93C46.hh.

Referenced by write_DI().

◆ NUM_ADDRESSES

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

Definition at line 18 of file EEPROM_93C46.hh.

Referenced by reset(), and TEST_CASE().


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