From b35a5f360c9f277093fa575fdb9e5d7b53d5a4eb Mon Sep 17 00:00:00 2001 From: Rodrigo Alfonso Date: Sun, 12 Jan 2025 07:09:40 -0300 Subject: [PATCH] Helping the compiler figure out that LinkWireless doesn't need clock inversion code --- lib/LinkRawWireless.hpp | 4 ++-- lib/LinkWireless.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/LinkRawWireless.hpp b/lib/LinkRawWireless.hpp index 8e239e1..9232293 100644 --- a/lib/LinkRawWireless.hpp +++ b/lib/LinkRawWireless.hpp @@ -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; diff --git a/lib/LinkWireless.hpp b/lib/LinkWireless.hpp index 77aef03..b1b95cd 100644 --- a/lib/LinkWireless.hpp +++ b/lib/LinkWireless.hpp @@ -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) {