File tree 1 file changed +3
-9
lines changed 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -73,10 +73,7 @@ class WireClassDispatcher : public HardwareI2C {
73
73
uint8_t endTransmission (bool stopBit) {
74
74
uint8_t res = wire.endTransmission (stopBit);
75
75
if (stopBit) {
76
- osStatus ret = sem->release ();
77
- if (ret != osOK) {
78
- Serial.println (" could not release semaphore" );
79
- }
76
+ sem->release ();
80
77
*transactionInProgress (rtos::ThisThread::get_id ()) = false ;
81
78
} else {
82
79
*transactionInProgress (rtos::ThisThread::get_id ()) = true ;
@@ -89,7 +86,7 @@ class WireClassDispatcher : public HardwareI2C {
89
86
}
90
87
91
88
uint8_t requestFrom (uint8_t address, size_t len, bool stopBit) {
92
- if (!transactionInProgress (rtos::ThisThread::get_id ())) {
89
+ if (!* transactionInProgress (rtos::ThisThread::get_id ())) {
93
90
sem->acquire ();
94
91
}
95
92
uint8_t ret = wire.requestFrom (address, len, stopBit);
@@ -99,11 +96,8 @@ class WireClassDispatcher : public HardwareI2C {
99
96
}
100
97
}
101
98
if (stopBit) {
102
- osStatus ret = sem->release ();
103
- if (ret != osOK) {
104
- Serial.println (" could not release semaphore" );
105
- }
106
99
*transactionInProgress (rtos::ThisThread::get_id ()) = false ;
100
+ sem->release ();
107
101
} else {
108
102
*transactionInProgress (rtos::ThisThread::get_id ()) = true ;
109
103
}
You can’t perform that action at this time.
0 commit comments