Helping the compiler figure out that LinkWireless doesn't need clock inversion code

This commit is contained in:
Rodrigo Alfonso
2025-01-12 07:09:40 -03:00
parent b3ddf16b35
commit b35a5f360c
2 changed files with 3 additions and 3 deletions

View File

@@ -1077,7 +1077,7 @@ class LinkRawWireless {
* @brief This method is called by the SERIAL interrupt handler.
* \warning This is internal API!
*/
int _onSerial() {
int _onSerial(bool _withClockInversion = false) {
if (!isEnabled)
return -1;
@@ -1096,7 +1096,7 @@ class LinkRawWireless {
if (!acknowledge())
return -4;
sendAsyncCommand(newData);
} else {
} else if (_withClockInversion) {
if (!reverseAcknowledge(asyncCommand.step ==
AsyncCommand::Step::DATA_REQUEST))
return -5;

View File

@@ -829,7 +829,7 @@ class LinkWireless {
profileStart();
#endif
int status = linkRawWireless._onSerial();
int status = linkRawWireless._onSerial(false);
if (status <= -4)
return (void)abort(ACKNOWLEDGE_FAILED);
else if (status <= 0) {