|
|
@ -471,7 +471,7 @@ bool hardwareResourceSerialProvider::create_HW(){ |
|
|
m_bManualRTS = true; |
|
|
m_bManualRTS = true; |
|
|
wiringPiSetup(); |
|
|
wiringPiSetup(); |
|
|
//Set RTS Pin
|
|
|
//Set RTS Pin
|
|
|
pinMode( 0, OUTPUT ); |
|
|
|
|
|
|
|
|
pinMode( RTS_PIN_NUMBER, OUTPUT ); |
|
|
} else { |
|
|
} else { |
|
|
#ifdef DEBUG
|
|
|
#ifdef DEBUG
|
|
|
LOG("NO MANUAL RTS CTL(R)"); |
|
|
LOG("NO MANUAL RTS CTL(R)"); |
|
|
@ -490,7 +490,7 @@ bool hardwareResourceSerialProvider::create_HW(){ |
|
|
} else { |
|
|
} else { |
|
|
//Set RTS Pin
|
|
|
//Set RTS Pin
|
|
|
//pinMode( 0, OUTPUT );
|
|
|
//pinMode( 0, OUTPUT );
|
|
|
pinMode( 0, PINMODE_OUTPUT); |
|
|
|
|
|
|
|
|
pinMode( RTS_PIN_NUMBER, PINMODE_OUTPUT); |
|
|
m_bManualRTS = true; |
|
|
m_bManualRTS = true; |
|
|
}; |
|
|
}; |
|
|
} else { |
|
|
} else { |
|
|
@ -1222,9 +1222,9 @@ void hardwareResourceSerialProvider::setRTS( uint8_t Val ){ |
|
|
#if defined( USE_WIRINGPI ) || defined( USE_WIRINGX )
|
|
|
#if defined( USE_WIRINGPI ) || defined( USE_WIRINGX )
|
|
|
if ( Val ) { |
|
|
if ( Val ) { |
|
|
//Use RTS GPIO
|
|
|
//Use RTS GPIO
|
|
|
digitalWrite( 0, HIGH ); |
|
|
|
|
|
|
|
|
digitalWrite( RTS_PIN_NUMBER, HIGH ); |
|
|
} else { |
|
|
} else { |
|
|
digitalWrite( 0, LOW ); |
|
|
|
|
|
|
|
|
digitalWrite( RTS_PIN_NUMBER, LOW ); |
|
|
}; |
|
|
}; |
|
|
#else
|
|
|
#else
|
|
|
int flags; |
|
|
int flags; |
|
|
@ -1262,7 +1262,7 @@ int hardwareResourceSerialProvider::sendBlock(unsigned char* Data, int DataSize) |
|
|
do{ |
|
|
do{ |
|
|
if( m_bManualRTS ) { |
|
|
if( m_bManualRTS ) { |
|
|
#if defined( USE_WIRINGPI ) || defined( USE_WIRINGX )
|
|
|
#if defined( USE_WIRINGPI ) || defined( USE_WIRINGX )
|
|
|
digitalWrite( 0, HIGH ); |
|
|
|
|
|
|
|
|
digitalWrite( RTS_PIN_NUMBER, HIGH ); |
|
|
#else
|
|
|
#else
|
|
|
setRTS( 1 ); |
|
|
setRTS( 1 ); |
|
|
#endif
|
|
|
#endif
|
|
|
@ -1274,7 +1274,7 @@ int hardwareResourceSerialProvider::sendBlock(unsigned char* Data, int DataSize) |
|
|
int r = ioctl( m_iOutFID, TIOCSERGETLSR, &lsr ); |
|
|
int r = ioctl( m_iOutFID, TIOCSERGETLSR, &lsr ); |
|
|
} while (!(lsr & TIOCSER_TEMT)); |
|
|
} while (!(lsr & TIOCSER_TEMT)); |
|
|
#if defined( USE_WIRINGPI ) || defined( USE_WIRINGX )
|
|
|
#if defined( USE_WIRINGPI ) || defined( USE_WIRINGX )
|
|
|
digitalWrite( 0, LOW ); |
|
|
|
|
|
|
|
|
digitalWrite( RTS_PIN_NUMBER, LOW ); |
|
|
#else
|
|
|
#else
|
|
|
setRTS( 0 ); |
|
|
setRTS( 0 ); |
|
|
#endif
|
|
|
#endif
|
|
|
|