Change in osmo-ccid-firmware[master]: ncn8025: Invert the software logic of RSTIN

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Apr 16 19:20:37 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13668 )

Change subject: ncn8025: Invert the software logic of RSTIN
......................................................................

ncn8025: Invert the software logic of RSTIN

In hardware, the Card RST pin is low-active.  There's a level
translator in the NCN8025, but there's no logic inversion, so RSTIN
is also low-active.  In software, we have the policy of all signals
being "true-active", i.e. true represents the active state, and false
the inactive state.

Hence, we must invert the logic of how we handle rstin.

Change-Id: Ia45246b7517b2e6ecb01d22b3af52aee7a51de64
---
M sysmoOCTSIM/ncn8025.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/sysmoOCTSIM/ncn8025.c b/sysmoOCTSIM/ncn8025.c
index 61509bc..711b082 100644
--- a/sysmoOCTSIM/ncn8025.c
+++ b/sysmoOCTSIM/ncn8025.c
@@ -21,7 +21,7 @@
 static uint8_t ncn8025_encode(const struct ncn8025_settings *set)
 {
 	uint8_t reg = 0;
-	if (set->rstin)
+	if (!set->rstin)
 		reg |= 0x01;
 	if (!set->cmdvcc)
 		reg |= 0x02;
@@ -43,7 +43,7 @@
 {
 	memset(set, 0, sizeof(*set));
 
-	if (reg & 0x01)
+	if (!(reg & 0x01))
 		set->rstin = true;
 	if (!(reg & 0x02))
 		set->cmdvcc = true;

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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia45246b7517b2e6ecb01d22b3af52aee7a51de64
Gerrit-Change-Number: 13668
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190416/712d0219/attachment.htm>


More information about the gerrit-log mailing list