Lines Matching refs:context
301 status_t SMARTCARD_PHY_Activate(void *base, smartcard_context_t *context, smartcard_reset_type_t re… in SMARTCARD_PHY_Activate() argument
303 if ((NULL == context) || (NULL == context->timeDelay)) in SMARTCARD_PHY_Activate()
308 context->timersState.initCharTimerExpired = false; in SMARTCARD_PHY_Activate()
309 context->resetType = resetType; in SMARTCARD_PHY_Activate()
326 …((GPIO_Type *)gpio_base[context->interfaceConfig.resetPort])->PCOR |= (1u << context->interfaceCon… in SMARTCARD_PHY_Activate()
327 ((GPIO_Type *)gpio_base[context->interfaceConfig.controlPort])->PSOR |= in SMARTCARD_PHY_Activate()
328 (1u << context->interfaceConfig.controlPin); in SMARTCARD_PHY_Activate()
335 ((GPIO_Type *)gpio_base[context->interfaceConfig.controlPort])->PCOR |= in SMARTCARD_PHY_Activate()
336 (1u << context->interfaceConfig.controlPin); in SMARTCARD_PHY_Activate()
347 context->timeDelay(3500u); in SMARTCARD_PHY_Activate()
348 smartcard_phy_tda8035_InterfaceClockEnable(base, &context->interfaceConfig); in SMARTCARD_PHY_Activate()
352 if (!context->cardParams.active) in SMARTCARD_PHY_Activate()
360 …((GPIO_Type *)gpio_base[context->interfaceConfig.resetPort])->PCOR |= (1u << context->interfaceCon… in SMARTCARD_PHY_Activate()
371 …((((uint32_t)10000u * context->interfaceConfig.clockToResetDelay) / context->interfaceConfig.smart… in SMARTCARD_PHY_Activate()
374 context->timeDelay(temp); in SMARTCARD_PHY_Activate()
379 …((GPIO_Type *)gpio_base[context->interfaceConfig.resetPort])->PSOR |= (1u << context->interfaceCon… in SMARTCARD_PHY_Activate()
403 smartcard_uart_TimerStart(context->interfaceConfig.tsTimerId, in SMARTCARD_PHY_Activate()
405 … (CLOCK_GetFreq(kCLOCK_BusClk) / context->interfaceConfig.smartCardClock)); in SMARTCARD_PHY_Activate()
408 context->cardParams.active = true; in SMARTCARD_PHY_Activate()
413 status_t SMARTCARD_PHY_Deactivate(void *base, smartcard_context_t *context) in SMARTCARD_PHY_Deactivate() argument
415 if ((NULL == context)) in SMARTCARD_PHY_Deactivate()
429 …((GPIO_Type *)gpio_base[context->interfaceConfig.controlPort])->PSOR |= (1u << context->interfaceC… in SMARTCARD_PHY_Deactivate()
430 …((GPIO_Type *)gpio_base[context->interfaceConfig.resetPort])->PCOR |= (1u << context->interfaceCon… in SMARTCARD_PHY_Deactivate()
435 context->timeDelay(100 * 1000); in SMARTCARD_PHY_Deactivate()
437 context->cardParams.active = false; in SMARTCARD_PHY_Deactivate()
442 smartcard_phy_tda8035_InterfaceClockDisable(base, &context->interfaceConfig); in SMARTCARD_PHY_Deactivate()
448 smartcard_context_t *context, in SMARTCARD_PHY_Control() argument
452 if ((NULL == context)) in SMARTCARD_PHY_Control()
465 context->interfaceConfig.vcc = (smartcard_card_voltage_class_t)param; in SMARTCARD_PHY_Control()
469 context->interfaceConfig.clockToResetDelay = param; in SMARTCARD_PHY_Control()
474 context->cardParams.present = in SMARTCARD_PHY_Control()
478 if (((GPIO_Type *)gpio_base[context->interfaceConfig.controlPort])->PDIR & in SMARTCARD_PHY_Control()
479 (1u << context->interfaceConfig.controlPin)) in SMARTCARD_PHY_Control()
481 if (((GPIO_Type *)gpio_base[context->interfaceConfig.irqPort])->PDIR & in SMARTCARD_PHY_Control()
482 (1u << context->interfaceConfig.irqPin)) in SMARTCARD_PHY_Control()
484 context->cardParams.present = true; in SMARTCARD_PHY_Control()
485 context->cardParams.active = false; in SMARTCARD_PHY_Control()
486 context->cardParams.faulty = false; in SMARTCARD_PHY_Control()
487 context->cardParams.status = SMARTCARD_TDA8035_STATUS_PRES; in SMARTCARD_PHY_Control()
491 context->cardParams.present = false; in SMARTCARD_PHY_Control()
492 context->cardParams.active = false; in SMARTCARD_PHY_Control()
493 context->cardParams.faulty = false; in SMARTCARD_PHY_Control()
494 context->cardParams.status = 0u; in SMARTCARD_PHY_Control()
499 if (((GPIO_Type *)gpio_base[context->interfaceConfig.irqPort])->PDIR & in SMARTCARD_PHY_Control()
500 (1u << context->interfaceConfig.irqPin)) in SMARTCARD_PHY_Control()
502 context->cardParams.present = true; in SMARTCARD_PHY_Control()
503 context->cardParams.active = true; in SMARTCARD_PHY_Control()
504 context->cardParams.faulty = false; in SMARTCARD_PHY_Control()
505 … context->cardParams.status = SMARTCARD_TDA8035_STATUS_PRES | SMARTCARD_TDA8035_STATUS_ACTIVE; in SMARTCARD_PHY_Control()
514 if (((GPIO_Type *)gpio_base[context->interfaceConfig.irqPort])->PDIR & in SMARTCARD_PHY_Control()
515 (1u << context->interfaceConfig.irqPin)) in SMARTCARD_PHY_Control()
519 context->cardParams.present = true; in SMARTCARD_PHY_Control()
520 context->cardParams.active = false; in SMARTCARD_PHY_Control()
521 context->cardParams.faulty = true; in SMARTCARD_PHY_Control()
522 … context->cardParams.status = SMARTCARD_TDA8035_STATUS_PRES | SMARTCARD_TDA8035_STATUS_FAULTY | in SMARTCARD_PHY_Control()
529 context->cardParams.present = false; in SMARTCARD_PHY_Control()
530 context->cardParams.active = false; in SMARTCARD_PHY_Control()
531 context->cardParams.faulty = false; in SMARTCARD_PHY_Control()
532 context->cardParams.status = in SMARTCARD_PHY_Control()
547 void SMARTCARD_PHY_IRQHandler(void *base, smartcard_context_t *context) in SMARTCARD_PHY_IRQHandler() argument
549 if ((NULL == context)) in SMARTCARD_PHY_IRQHandler()
554 (void)SMARTCARD_PHY_Control(base, context, kSMARTCARD_InterfaceReadStatus, 0u); in SMARTCARD_PHY_IRQHandler()
556 if (NULL != context->interfaceCallback) in SMARTCARD_PHY_IRQHandler()
558 context->interfaceCallback(context, context->interfaceCallbackParam); in SMARTCARD_PHY_IRQHandler()