simulavr  1.1.0
SpiSink Class Reference

#include <spisink.h>

Inheritance diagram for SpiSink:

Public Member Functions

 SpiSink (Net &ssNet, Net &sclkNet, Net &misoNet, bool clockIsIdleHigh=true, bool clockSampleOnLeadingEdge=true) throw ()
 
- Public Member Functions inherited from SimulationMember
virtual ~SimulationMember ()
 

Private Member Functions

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

Private Attributes

unsigned char _port
 
Pin _ss
 
Pin _sclk
 
Pin _miso
 
bool _ssState
 
bool _sclkState
 
bool _misoState
 
unsigned _state
 
unsigned char _sr
 
bool _clockIsIdleHigh
 
bool _clockSampleOnLeadingEdge
 
bool _prevClkState
 
bool _prevSS
 

Detailed Description

Definition at line 8 of file spisink.h.

Constructor & Destructor Documentation

◆ SpiSink()

SpiSink::SpiSink ( Net ssNet,
Net sclkNet,
Net misoNet,
bool  clockIsIdleHigh = true,
bool  clockSampleOnLeadingEdge = true 
)
throw (
)

Definition at line 12 of file spisink.cpp.

References Pin::PULLUP.

Member Function Documentation

◆ Step()

int SpiSink::Step ( bool &  trueHwStep,
SystemClockOffset timeToNextStepIn_ns = 0 
)
privatevirtual

Return nonzero if a breakpoint was hit.

Implements SimulationMember.

Definition at line 42 of file spisink.cpp.

References MISOBIT, SCLKBIT, and SSBIT.

Member Data Documentation

◆ _clockIsIdleHigh

bool SpiSink::_clockIsIdleHigh
private

Definition at line 19 of file spisink.h.

◆ _clockSampleOnLeadingEdge

bool SpiSink::_clockSampleOnLeadingEdge
private

Definition at line 20 of file spisink.h.

◆ _miso

Pin SpiSink::_miso
private

Definition at line 13 of file spisink.h.

◆ _misoState

bool SpiSink::_misoState
private

Definition at line 16 of file spisink.h.

◆ _port

unsigned char SpiSink::_port
private

Definition at line 10 of file spisink.h.

◆ _prevClkState

bool SpiSink::_prevClkState
private

Definition at line 21 of file spisink.h.

◆ _prevSS

bool SpiSink::_prevSS
private

Definition at line 22 of file spisink.h.

◆ _sclk

Pin SpiSink::_sclk
private

Definition at line 12 of file spisink.h.

◆ _sclkState

bool SpiSink::_sclkState
private

Definition at line 15 of file spisink.h.

◆ _sr

unsigned char SpiSink::_sr
private

Definition at line 18 of file spisink.h.

◆ _ss

Pin SpiSink::_ss
private

Definition at line 11 of file spisink.h.

◆ _ssState

bool SpiSink::_ssState
private

Definition at line 14 of file spisink.h.

◆ _state

unsigned SpiSink::_state
private

Definition at line 17 of file spisink.h.


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