From 0ed5d4f1d36d6fa1d798b24ae630fc5fdf721efe Mon Sep 17 00:00:00 2001 From: root Date: Tue, 30 May 2023 14:58:11 +0000 Subject: [PATCH] Fixed GPIO issues for WiringX library --- lib/App/common/hardwareResourceSerialProvider.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/App/common/hardwareResourceSerialProvider.cpp b/lib/App/common/hardwareResourceSerialProvider.cpp index 33044cbc..57f6081b 100644 --- a/lib/App/common/hardwareResourceSerialProvider.cpp +++ b/lib/App/common/hardwareResourceSerialProvider.cpp @@ -1227,7 +1227,9 @@ int hardwareResourceSerialProvider::sendBlock(unsigned char* Data, int DataSize) // setRTS( 1 ); do{ #if defined( USE_WIRINGPI ) || defined( USE_WIRINGX ) - if( m_bManualRTS ) digitalWrite( 0, HIGH ); + if( m_bManualRTS ) { + digitalWrite( 0, HIGH ); + }; #endif RetVal = write( m_iOutFID, Data, DataSize); if( m_bManualRTS ){ @@ -1235,7 +1237,7 @@ int hardwareResourceSerialProvider::sendBlock(unsigned char* Data, int DataSize) do { int r = ioctl( m_iOutFID, TIOCSERGETLSR, &lsr ); } while (!(lsr & TIOCSER_TEMT)); - #ifdef defined( USE_WIRINGPI ) || defined( USE_WIRINGX ) + #if defined( USE_WIRINGPI ) || defined( USE_WIRINGX ) digitalWrite( 0, LOW); #endif };