59 HWPort(
AvrDevice *core,
const std::string &name,
bool portToggle =
false,
int size = 8);
69 void SetPort(
unsigned char val);
70 void SetDdr(
unsigned char val);
71 void SetPin(
unsigned char val);
72 void SetPinBit(
bool bit,
unsigned int bitaddr);
79 unsigned char GetPinBit(
unsigned int bitaddr) {
return pin&(1<<bitaddr);}
std::string myName
the "name" of the port
unsigned char GetPin()
getter method for PIN register
Basic AVR device, contains the core functionality.
TraceValue * pintrace[8]
trace channel to trace output driver state
Pin class, handles input and output to external parts.
unsigned char pin
port input register
Defines a Port, e.g. a hardware device for GPIO.
void CalcOutputs(void)
Calculate the new output value to be transmitted to the environment.
HWPort(AvrDevice *core, const std::string &name, bool portToggle=false, int size=8)
unsigned char portMask
mask out unused bits, if necessary
unsigned char ddr
data direction register
Build a register for TraceValue's.
void SetPinBit(bool bit, unsigned int bitaddr)
std::string GetPortString(void)
returns a string representation of output states
unsigned char port
port output register
int GetPortSize(void)
returns, how much bits this port controls
bool portToggleFeature
controls functionality of SetPin method (write to PIN toggles port register)
unsigned char GetDdr()
getter method for data direction register
std::string GetName(void)
returns the port name as given in constructor
Pin class for HWPort, a special pin with override functionality for output stage. ...
void SetDdr(unsigned char val)
setter method for data direction register
void SetPort(unsigned char val)
setter method for port register
PortPin p[8]
the port pins, e.g. the final IO stages
void SetPin(unsigned char val)
setter method for PIN register (for new devices with toggle port)
unsigned char GetPinBit(unsigned int bitaddr)
unsigned char GetPort()
getter method for port register
unsigned int portSize
how much bits does this port have [1..8]