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

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

Harald Welte has submitted this change and it was merged. ( )

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(-)

  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
To unsubscribe, or for help writing mail filters, visit

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>
Gerrit-Reviewer: Harald Welte <laforge at>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list