Change in simtrace2[master]: sniffer: fix inverted reset meaning

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Kévin Redon gerrit-no-reply at lists.osmocom.org
Tue Jul 10 14:04:07 UTC 2018


Kévin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/9944


Change subject: sniffer: fix inverted reset meaning
......................................................................

sniffer: fix inverted reset meaning

Change-Id: I860e2e29c059e1e0ec126695bb68d489891a17da
---
M firmware/libcommon/source/sniffer.c
1 file changed, 7 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/44/9944/1

diff --git a/firmware/libcommon/source/sniffer.c b/firmware/libcommon/source/sniffer.c
index 0ca71a5..c58b047 100644
--- a/firmware/libcommon/source/sniffer.c
+++ b/firmware/libcommon/source/sniffer.c
@@ -832,11 +832,11 @@
 		TRACE_ERROR("Pin other than reset caused a interrupt\n\r");
 		return;
 	}
-	/* Update the ISO state according to the reset change */
+	/* Update the ISO state according to the reset change (reset is active low) */
 	if (PIO_Get(&pin_rst)) {
-		change_flags |= SNIFF_CHANGE_FLAG_RESET_HOLD; /* set flag and let main loop send it */
-	} else {
 		change_flags |= SNIFF_CHANGE_FLAG_RESET_RELEASE; /* set flag and let main loop send it */
+	} else {
+		change_flags |= SNIFF_CHANGE_FLAG_RESET_HOLD; /* set flag and let main loop send it */
 	}
 }
 
@@ -1011,13 +1011,13 @@
 	/* Handle flags */
 	if (change_flags) { /* WARNING this is not synced with the data buffer handling */
 		if (change_flags & SNIFF_CHANGE_FLAG_RESET_HOLD) {
-			if (ISO7816_S_WAIT_ATR != iso_state) {
-				change_state(ISO7816_S_WAIT_ATR);
+			if (ISO7816_S_RESET != iso_state) {
+				change_state(ISO7816_S_RESET);
 			}
 		}
 		if (change_flags & SNIFF_CHANGE_FLAG_RESET_RELEASE) {
-			if (ISO7816_S_RESET != iso_state) {
-				change_state(ISO7816_S_RESET);
+			if (ISO7816_S_WAIT_ATR != iso_state) {
+				change_state(ISO7816_S_WAIT_ATR);
 			}
 		}
 		if (change_flags & SNIFF_CHANGE_FLAG_TIMEOUT_WT) {

-- 
To view, visit https://gerrit.osmocom.org/9944
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I860e2e29c059e1e0ec126695bb68d489891a17da
Gerrit-Change-Number: 9944
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon <kredon at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180710/596b384d/attachment.htm>


More information about the gerrit-log mailing list