SpiSource Class Reference

#include <spisrc.h>

Inheritance diagram for SpiSource:
Inheritance graph
[legend]
Collaboration diagram for SpiSource:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SpiSource (const char *fileName, Net &ssNet, Net &sclkNet, Net &mosiNet) throw ()

Private Member Functions

int Step (bool &trueHwStep, SystemClockOffset *timeToNextStepIn_ns=0)
 Return nonzero if a breakpoint was hit.

Private Attributes

Pin _ss
Pin _sclk
Pin _mosi
std::ifstream _spiFile

Detailed Description

Reads stimuli from file and outputs data via SPI to nets provided to constructor. Simulates SPI clock rate 10 kHz.

Definition at line 8 of file spisrc.h.


Constructor & Destructor Documentation

SpiSource::SpiSource ( const char *  fileName,
Net ssNet,
Net sclkNet,
Net mosiNet 
) throw ()

Definition at line 7 of file spisrc.cpp.

References avr_error, and Pin::HIGH.


Member Function Documentation

int SpiSource::Step ( bool &  trueHwStep,
SystemClockOffset timeToNextStepIn_ns = 0 
) [private, virtual]

Return nonzero if a breakpoint was hit.

Implements SimulationMember.

Definition at line 44 of file spisrc.cpp.

References _mosi, _sclk, _spiFile, _ss, and readNextLine().

Here is the call graph for this function:


Member Data Documentation

Pin SpiSource::_mosi [private]

Definition at line 12 of file spisrc.h.

Referenced by Step().

Pin SpiSource::_sclk [private]

Definition at line 11 of file spisrc.h.

Referenced by Step().

std::ifstream SpiSource::_spiFile [private]

Definition at line 13 of file spisrc.h.

Referenced by Step().

Pin SpiSource::_ss [private]

Definition at line 10 of file spisrc.h.

Referenced by Step().


The documentation for this class was generated from the following files:
Generated on Sun Feb 12 16:53:07 2012 for Simulavr by  doxygen 1.6.3