What is the difference in creating the pins in the following ways?
1) -----------------------------------------------------------------------
QStringList pinList; // Create Pin List
pinList // Inputs:
<< "IL01 SDA"//type: Input, side: Left, pos: 01, label: "SDA"
<< "IL03 SCL"
<< "IR01 A0"
<< "IR02 A1"
<< "IR03 A2"
// Outputs:
;
init( pinList ); // Create Pins Defined in pinList
2)------------------------------------------------------------------------
Ssd1306::Ssd1306( QObject* parent, QString type, QString id )
: Component( parent, type, id )
, eI2C( id.toStdString() )
, m_pinSck( 270, QPoint(-48, 48), id+"-PinSck" , 0, this )
, m_pinSda( 270, QPoint(-40, 48), id+"-PinSda" , 0, this )
//, m_pinRst( 270, QPoint(-32, 48), id+"-PinRst" , 0, this )
//, m_pinDC ( 270, QPoint(-24, 48), id+"-PinDC" , 0, this )
//, m_pinCS ( 270, QPoint(-16, 48), id+"-PinCS" , 0, this )
{
3) ------------------------------------------------------------------------
m_pin.resize( 1 );
QString pinId = m_id;
pinId.append(QString("-lPin"));
QPoint pinPos = QPoint(-8-8,-;
m_pin[0] = new Pin( 180, pinPos, pinId, 0, this);
m_pin[0]->setLabelText( "+" );
m_pin[0]->setLabelColor( QColor( 0, 0, 0 ) );
m_ePin[0] = m_pin[0];
-------------------------------------------------------------------------
I created a component with only one pin created the way 2) ,
set as input "eLogicDevice::createInput( &m_in_pin );"
I can read the status "eLogicDevice::getInputState( 0 );"
but i can't use it as an output, i tried:
m_input[0]->setOut( false );
m_input[0]->setImp( m_outImp); or m_input[0]->setImp( high_imp);
and
m_input[0]->setOut( false );
m_input[0]->setVoltHigh( 5 ); or m_input[0]->setVoltHigh( 0 );
Regards
Giordano
m_input[0]->stampOutput();
but the pin does not change state
1) -----------------------------------------------------------------------
QStringList pinList; // Create Pin List
pinList // Inputs:
<< "IL01 SDA"//type: Input, side: Left, pos: 01, label: "SDA"
<< "IL03 SCL"
<< "IR01 A0"
<< "IR02 A1"
<< "IR03 A2"
// Outputs:
;
init( pinList ); // Create Pins Defined in pinList
2)------------------------------------------------------------------------
Ssd1306::Ssd1306( QObject* parent, QString type, QString id )
: Component( parent, type, id )
, eI2C( id.toStdString() )
, m_pinSck( 270, QPoint(-48, 48), id+"-PinSck" , 0, this )
, m_pinSda( 270, QPoint(-40, 48), id+"-PinSda" , 0, this )
//, m_pinRst( 270, QPoint(-32, 48), id+"-PinRst" , 0, this )
//, m_pinDC ( 270, QPoint(-24, 48), id+"-PinDC" , 0, this )
//, m_pinCS ( 270, QPoint(-16, 48), id+"-PinCS" , 0, this )
{
3) ------------------------------------------------------------------------
m_pin.resize( 1 );
QString pinId = m_id;
pinId.append(QString("-lPin"));
QPoint pinPos = QPoint(-8-8,-;
m_pin[0] = new Pin( 180, pinPos, pinId, 0, this);
m_pin[0]->setLabelText( "+" );
m_pin[0]->setLabelColor( QColor( 0, 0, 0 ) );
m_ePin[0] = m_pin[0];
-------------------------------------------------------------------------
I created a component with only one pin created the way 2) ,
set as input "eLogicDevice::createInput( &m_in_pin );"
I can read the status "eLogicDevice::getInputState( 0 );"
but i can't use it as an output, i tried:
m_input[0]->setOut( false );
m_input[0]->setImp( m_outImp); or m_input[0]->setImp( high_imp);
and
m_input[0]->setOut( false );
m_input[0]->setVoltHigh( 5 ); or m_input[0]->setVoltHigh( 0 );
Regards
Giordano
m_input[0]->stampOutput();
but the pin does not change state