Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/39760?usp=email )
Change subject: clean up slot reset hack ...................................................................... clean up slot reset hack Change-Id: Iebde945661569882d136406b8c11fa9653323d37 --- M ccid_common/ccid_slot_fsm.c M sysmoOCTSIM/main.c M sysmoOCTSIM/usb/class/ccid/device/ccid_df.h 3 files changed, 2 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/60/39760/1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index a521b1d..eb0c145 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -105,23 +105,6 @@ } } -void extern_fsm_reset_hack(struct ccid_slot *cs) -{ - struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); - - cs->icc_present = false; - osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_CARD_REMOVAL, NULL); - card_uart_ctrl(ss->cuart, CUART_CTL_RST, true); - card_uart_ctrl(ss->cuart, CUART_CTL_POWER_5V0, false); - cs->icc_powered = false; - cs->cmd_busy = false; - cs->icc_present_last = false; - cs->icc_in_reset = false; - cs->default_pars = &iso_fsm_def_pars; - g_si.slot[cs->slot_nr].seq = 0; - card_uart_ctrl(ss->cuart, CUART_CTL_RX, true); -} - static void iso_fsm_slot_icc_power_on_async(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_icc_power_on *ipo) { diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index e386557..e8cb920 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -552,8 +552,6 @@ } extern volatile bool was_unconfigured_flag; -void extern_fsm_reset_hack(struct ccid_slot *cs); -void ccid_eps_enable(void); void reset_all_stuff_non_irq(void) { @@ -567,8 +565,7 @@ } for (int i = 0; i <= usb_fs_descs.ccid.class.bMaxSlotIndex; i++) { - // g_ci.slot_ops->icc_set_insertion_status(&g_ci.slot[i], false); - extern_fsm_reset_hack(&g_ci.slot[i]); + g_ci.slot_ops->icc_set_insertion_status(&g_ci.slot[i], false); g_ci.slot_ops->handle_fsm_events(&g_ci.slot[i], true); } diff --git a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.h b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.h index 21fa99e..9813ae7 100644 --- a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.h +++ b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.h @@ -15,3 +15,4 @@ int32_t ccid_df_write_irq(uint8_t *buf, uint32_t size); int32_t ccid_df_register_callback(enum ccid_df_cb_type cb_type, FUNC_PTR ptr); bool ccid_df_is_enabled(void); +void ccid_eps_enable(void); \ No newline at end of file -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/39760?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iebde945661569882d136406b8c11fa9653323d37 Gerrit-Change-Number: 39760 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ew...@sysmocom.de>