simulavr
1.1.0
|
#include <pinatport.h>
Public Member Functions | |
PinAtPort () | |
PinAtPort (HWPort *p, unsigned char pn) | |
void | SetPort (bool val) |
void | SetDdr (bool val) |
void | SetAlternatePullup (bool val) |
void | SetUseAlternatePullup (bool val) |
void | SetAlternateDdr (bool val) |
void | SetUseAlternateDdr (bool val) |
void | SetAlternatePort (bool val) |
void | SetUseAlternatePort (bool val) |
void | SetUseAlternatePortIfDdrSet (bool val) |
bool | GetPort () |
bool | GetDdr () |
Pin & | GetPin () |
bool | active () |
operator bool () | |
float | GetAnalogValue (float vcc) |
Get pin analog voltage level. More... | |
Protected Member Functions | |
void | SetVal (unsigned char *adr, bool val) |
Protected Attributes | |
HWPort * | port |
unsigned char | pinNo |
int | regID |
PinAtPort is a wrapper class to get internal access to a dedicated pin on a port and to control especially the alternate functionality for a port pin
Definition at line 34 of file pinatport.h.
PinAtPort::PinAtPort | ( | ) |
Definition at line 29 of file pinatport.cpp.
PinAtPort::PinAtPort | ( | HWPort * | p, |
unsigned char | pn | ||
) |
Definition at line 35 of file pinatport.cpp.
References HWPort::p, pinNo, port, regID, and PortPin::RegisterAlternateUse().
bool PinAtPort::active | ( | ) |
Definition at line 41 of file pinatport.cpp.
References port.
float PinAtPort::GetAnalogValue | ( | float | vcc | ) |
Get pin analog voltage level.
Definition at line 55 of file pinatport.cpp.
References Pin::GetAnalogValue(), HWPort::p, pinNo, and port.
Referenced by HWAcomp::GetIn0(), and HWAcomp::GetIn1().
bool PinAtPort::GetDdr | ( | ) |
Definition at line 104 of file pinatport.cpp.
References HWPort::ddr, pinNo, and port.
Referenced by HWSpi::CpuCycle(), and HWUSI::PinStateHasChanged().
Pin & PinAtPort::GetPin | ( | void | ) |
Definition at line 45 of file pinatport.cpp.
References HWPort::GetPin(), pinNo, and port.
Referenced by HWPrescalerAsync::CpuCycle(), HWAcomp::HWAcomp(), HWPrescalerAsync::HWPrescalerAsync(), HWUSI::PinStateHasChanged(), and HWUSI::registerDIandSCK().
bool PinAtPort::GetPort | ( | ) |
Definition at line 100 of file pinatport.cpp.
References pinNo, port, and HWPort::port.
Referenced by HWUSI::PinStateHasChanged(), and HWUSI::toggleSCK().
PinAtPort::operator bool | ( | ) |
Definition at line 108 of file pinatport.cpp.
References HWPort::GetPin(), pinNo, and port.
void PinAtPort::SetAlternateDdr | ( | bool | val | ) |
Definition at line 75 of file pinatport.cpp.
References HWPort::CalcOutputs(), HWPort::p, pinNo, port, regID, and PortPin::SetDDOV().
Referenced by HWUSI::setDI(), HWUSI::setSCK_TWI(), and HWUart::SetUcr().
void PinAtPort::SetAlternatePort | ( | bool | val | ) |
Definition at line 85 of file pinatport.cpp.
References HWPort::CalcOutputs(), HWPort::p, pinNo, port, regID, and PortPin::SetPVOV().
Referenced by HWUSI::controlTWI(), HWSpi::CpuCycle(), HWUart::CpuCycleTx(), BasicTimerUnit::SetCompareOutput(), BasicTimerUnit::SetCompareOutputMode(), HWUSI::setDO(), BasicTimerUnit::SetPWMCompareOutput(), HWUart::SetUcr(), and HWSpi::txbit().
void PinAtPort::SetAlternatePullup | ( | bool | val | ) |
Definition at line 65 of file pinatport.cpp.
References HWPort::CalcOutputs(), HWPort::p, pinNo, port, regID, and PortPin::SetPUOV().
Referenced by HWUSI::controlTWI().
void PinAtPort::SetDdr | ( | bool | val | ) |
Definition at line 59 of file pinatport.cpp.
References HWPort::CalcOutputs(), HWPort::ddr, port, and SetVal().
void PinAtPort::SetPort | ( | bool | val | ) |
Definition at line 49 of file pinatport.cpp.
References HWPort::CalcOutputs(), port, HWPort::port, and SetVal().
Referenced by HWUSI::toggleSCK().
void PinAtPort::SetUseAlternateDdr | ( | bool | val | ) |
Definition at line 80 of file pinatport.cpp.
References HWPort::CalcOutputs(), HWPort::p, pinNo, port, regID, and PortPin::SetDDOE().
Referenced by HWUSI::controlTWI(), and HWUart::SetUcr().
void PinAtPort::SetUseAlternatePort | ( | bool | val | ) |
Definition at line 90 of file pinatport.cpp.
References HWPort::CalcOutputs(), HWPort::p, pinNo, port, regID, and PortPin::SetPVOE().
Referenced by HWUart::SetUcr().
void PinAtPort::SetUseAlternatePortIfDdrSet | ( | bool | val | ) |
Definition at line 95 of file pinatport.cpp.
References HWPort::CalcOutputs(), HWPort::p, pinNo, port, regID, and PortPin::SetPVOE_WithDDR().
Referenced by HWUSI::controlDO(), HWUSI::controlTWI(), and BasicTimerUnit::SetCompareOutputMode().
void PinAtPort::SetUseAlternatePullup | ( | bool | val | ) |
Definition at line 70 of file pinatport.cpp.
References HWPort::CalcOutputs(), HWPort::p, pinNo, port, regID, and PortPin::SetPUOE().
Referenced by HWUSI::controlTWI().
|
protected |
Definition at line 112 of file pinatport.cpp.
References pinNo.
|
protected |
Definition at line 37 of file pinatport.h.
Referenced by GetAnalogValue(), GetDdr(), GetPin(), GetPort(), operator bool(), PinAtPort(), SetAlternateDdr(), SetAlternatePort(), SetAlternatePullup(), SetUseAlternateDdr(), SetUseAlternatePort(), SetUseAlternatePortIfDdrSet(), SetUseAlternatePullup(), and SetVal().
|
protected |
Definition at line 36 of file pinatport.h.
Referenced by active(), GetAnalogValue(), GetDdr(), GetPin(), GetPort(), operator bool(), PinAtPort(), SetAlternateDdr(), SetAlternatePort(), SetAlternatePullup(), SetDdr(), SetPort(), SetUseAlternateDdr(), SetUseAlternatePort(), SetUseAlternatePortIfDdrSet(), and SetUseAlternatePullup().
|
protected |
Definition at line 38 of file pinatport.h.
Referenced by PinAtPort(), SetAlternateDdr(), SetAlternatePort(), SetAlternatePullup(), SetUseAlternateDdr(), SetUseAlternatePort(), SetUseAlternatePortIfDdrSet(), and SetUseAlternatePullup().