simulavr
1.1.0
|
Pin class to provide a analog input signal. More...
#include <adcpin.h>
Public Member Functions | |
void | setAnalogValue (float value) throw () |
Set the analog value and propagte through Net. More... | |
![]() | |
Pin (void) | |
common constructor, initial output state is tristate More... | |
Pin (const Pin &p) | |
copy constructor, copy values but no refs to Net or HWPort More... | |
Pin (T_Pinstate ps) | |
copy constructor from pin state More... | |
Pin (unsigned char *parentPin, unsigned char mask) | |
constructor for a port pin, only used in UI part! More... | |
Pin (float analog) | |
constructor for analog pin More... | |
virtual | ~Pin () |
pin destructor, breaks save connection to other pins, if necessary More... | |
operator char () const | |
return char representation for output stage More... | |
virtual Pin & | operator= (char) |
set output stage to (digital) state, set value for ANALOG state separately More... | |
virtual | operator bool () const |
return boolean state of output stage More... | |
virtual Pin | operator+ (const Pin &p) |
calculate common state from 2 connected pins More... | |
virtual Pin | operator+= (const Pin &p) |
calculate common state from connected other pin to this pin More... | |
virtual void | SetInState (const Pin &p) |
handles the input value from net More... | |
virtual void | RegisterNet (Net *n) |
registers Net instance on pin More... | |
virtual void | UnRegisterNet (Net *n) |
deletes Net instance registration for pin More... | |
virtual Pin | GetPin (void) |
"cast method" to get back a Pin instance More... | |
int | GetAnalog (void) |
Get analog value as integer from 0 to INT_MAX (for backward compatibility, will be deprecated later) More... | |
float | GetRawAnalog (void) const |
get back raw analog value (just variable content!) More... | |
float | GetAnalogValue (float vcc) |
Returns real analog input value of pin. More... | |
Pin & | SetAnalogValue (float value) |
Sets the pin to an real analog value. More... | |
void | SetRawAnalog (float value) |
void | RegisterCallback (HasPinNotifyFunction *) |
bool | CalcPin (void) |
Update input values from output values. More... | |
bool | isPortPin (void) |
True, if it's a port pin. More... | |
bool | isConnected (void) |
True, if it's connected to other pins. More... | |
bool | hasListener (void) |
True, if there change listeners. More... | |
Additional Inherited Members | |
![]() | |
enum | T_Pinstate { LOW, HIGH, SHORTED, PULLUP, TRISTATE, PULLDOWN, ANALOG, ANALOG_SHORTED } |
Possible PIN states. More... | |
![]() | |
T_Pinstate | outState |
discrete value of output stage More... | |
std::vector< HasPinNotifyFunction * > | notifyList |
listeners for change of input value More... | |
![]() | |
unsigned char * | pinOfPort |
points to HWPort::pin or nullptr More... | |
IOReg< HWPort > * | pinRegOfPort |
points to PIN io register of port or nullptr More... | |
unsigned char | mask |
byte mask for HWPort::pin More... | |
AnalogValue | analogVal |
"real" analog voltage value More... | |
Net * | connectedTo |
the connection to other pins (nullptr, if not connected) More... | |
Pin class to provide a analog input signal.
This class allows the analog simulator access to the analogValue field of the pin and causes the Net to update (CalcNet). Note there is no dependency on the UserInterface class.
|
inline |
Set the analog value and propagte through Net.
Definition at line 40 of file adcpin.h.
References Pin::SetAnalogValue().
Referenced by AdcPin::Step().