|
|
|
@ -1258,14 +1258,19 @@ int hardwareResourceSerialProvider::sendBlock(unsigned char* Data, int DataSize) |
|
|
|
switch( m_sUartData.type ) { |
|
|
|
case HARDWARE_UART:{ |
|
|
|
#ifdef __linux__
|
|
|
|
// setRTS( 1 );
|
|
|
|
if( m_bManualRTS ){ |
|
|
|
setRTS( 1 ); |
|
|
|
setRTS( 1 ); |
|
|
|
setRTS( 1 ); |
|
|
|
setRTS( 1 ); |
|
|
|
}; |
|
|
|
do{ |
|
|
|
if( m_bManualRTS ) { |
|
|
|
#if defined( USE_WIRINGPI ) || defined( USE_WIRINGX )
|
|
|
|
digitalWrite( RTS_PIN_NUMBER, HIGH ); |
|
|
|
#else
|
|
|
|
//#if defined( USE_WIRINGPI ) || defined( USE_WIRINGX )
|
|
|
|
// digitalWrite( RTS_PIN_NUMBER, HIGH );
|
|
|
|
//#else
|
|
|
|
setRTS( 1 ); |
|
|
|
#endif
|
|
|
|
//#endif
|
|
|
|
}; |
|
|
|
RetVal = write( m_iOutFID, Data, DataSize); |
|
|
|
if( m_bManualRTS ){ |
|
|
|
@ -1273,11 +1278,11 @@ int hardwareResourceSerialProvider::sendBlock(unsigned char* Data, int DataSize) |
|
|
|
do { |
|
|
|
int r = ioctl( m_iOutFID, TIOCSERGETLSR, &lsr ); |
|
|
|
} while (!(lsr & TIOCSER_TEMT)); |
|
|
|
#if defined( USE_WIRINGPI ) || defined( USE_WIRINGX )
|
|
|
|
digitalWrite( RTS_PIN_NUMBER, LOW ); |
|
|
|
#else
|
|
|
|
setRTS( 0 ); |
|
|
|
#endif
|
|
|
|
//#if defined( USE_WIRINGPI ) || defined( USE_WIRINGX )
|
|
|
|
// digitalWrite( RTS_PIN_NUMBER, LOW );
|
|
|
|
//#else
|
|
|
|
setRTS( 0 ); |
|
|
|
//#endif
|
|
|
|
|
|
|
|
}; |
|
|
|
if( RetVal == DataSize ){ |
|
|
|
|