Change in osmo-ccid-firmware[master]: add a "no rx or tx" state

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

Hoernchen gerrit-no-reply at lists.osmocom.org
Wed Nov 27 18:44:11 UTC 2019


Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 )


Change subject: add a "no rx or tx" state
......................................................................

add a "no rx or tx" state

Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63
---
M ccid_common/cuart.h
M ccid_common/iso7816_fsm.c
M sysmoOCTSIM/cuart_driver_asf4_usart_async.c
3 files changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/79/16279/1

diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h
index 6c53481..32a8daa 100644
--- a/ccid_common/cuart.h
+++ b/ccid_common/cuart.h
@@ -23,6 +23,7 @@
 
 enum card_uart_ctl {
 	CUART_CTL_RX,		/* enable/disable receiver */
+	CUART_CTL_NO_RXTX,		/* enable/disable receiver */
 	CUART_CTL_POWER,	/* enable/disable ICC power */
 	CUART_CTL_CLOCK,	/* enable/disable ICC clock */
 	CUART_CTL_CLOCK_FREQ, /* set ICC clock frequency (hz)*/
diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c
index 031f6b0..623193f 100644
--- a/ccid_common/iso7816_fsm.c
+++ b/ccid_common/iso7816_fsm.c
@@ -305,7 +305,7 @@
 {
 	struct iso7816_3_priv *ip = get_iso7816_3_priv(fi);
 	OSMO_ASSERT(fi->fsm == &iso7816_3_fsm);
-	card_uart_ctrl(ip->uart, CUART_CTL_RX, false);
+	card_uart_ctrl(ip->uart, CUART_CTL_NO_RXTX, true);
 	/* reset the TPDU state machine */
 	osmo_fsm_inst_dispatch(ip->tpdu_fi, ISO7816_E_TPDU_CLEAR_REQ, NULL);
 }
diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c
index a8f8044..21ab5a4 100644
--- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c
+++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c
@@ -348,6 +348,8 @@
 	Sercom *sercom = cuart->u.asf4.usa_pd->device.hw;
 
 	switch (ctl) {
+	case CUART_CTL_NO_RXTX:
+		break;
 	case CUART_CTL_RX:
 		if (arg){
 			sercom->USART.CTRLB.bit.RXEN = 1;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63
Gerrit-Change-Number: 16279
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191127/5dd25de4/attachment.htm>


More information about the gerrit-log mailing list