// Power on gsm modem
void turn_on_modem_pwr_physical(void)
{
	GPIO_DRV_SetPinOutput(SIM808_RESET);
	GPIO_DRV_SetPinOutput(SIM808_PWRKEY);
	vTaskDelay(1200 / portTICK_RATE_MS);
	GPIO_DRV_ClearPinOutput(SIM808_PWRKEY);
	vTaskDelay(2200 / portTICK_RATE_MS);
}
Exemple #2
0
/**
 * set BLE_RST pin to 0 and then release it
 */
void power_ResetKW40()
{
	GPIO_DRV_ClearPinOutput( KW40_RST );
	OSA_TimeDelay( 10 );
	GPIO_DRV_SetPinOutput( KW40_RST );
	OSA_TimeDelay( 200 );
}
Exemple #3
0
void MicoRfLed(bool onoff)
{
    if (onoff) {
        GPIO_DRV_ClearPinOutput(kGpioLED2);
    } else {
        GPIO_DRV_SetPinOutput(kGpioLED2);
    }
}
// Reset gsm modem
void reset_gsm_modem(void)
{
	// Reset GSM module min 105mS delay
	GPIO_DRV_ClearPinOutput(SIM808_RESET);
	vTaskDelay(200 / portTICK_RATE_MS);
	GPIO_DRV_SetPinOutput(SIM808_RESET);
	vTaskDelay(1000 / portTICK_RATE_MS);
}
Exemple #5
0
void PORTD_IRQHandler(void)
{
  PORT_HAL_ClearPortIntFlag(PORTD_BASE_PTR);

  if(haptic_MutexLock(0) == kStatus_OSA_Success)
  {
	  GPIO_DRV_ClearPinOutput( KW40_GPIO );
	  OSA_TimeDelay(1);
	  GPIO_DRV_SetPinOutput( KW40_GPIO );
	  haptic_MutexUnlock();
  }
}
Exemple #6
0
/**
 * turn the screen on by switching on the power supply
 * and sending the command
 */
void power_TurnScreenON()
{
    if ( false == isPowerActive_OLED )
    {
    	GPIO_DRV_TogglePinOutput( KW40_WU );
    	OSA_TimeDelay(10);
    	GPIO_DRV_SetPinOutput( KW40_GPIO );

        PWR_OLED_TurnON();
        while ( OLED_STATUS_SUCCESS != OLED_SendCmd( OLED_CMD_DISPLAYON, FIRST_BYTE ) ) {}
    }
}
/*lint -save  -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
  /* Write your local variable definition here */

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
  PE_low_level_init();
  /*** End of Processor Expert internal initialization.                    ***/

  /* Write your code here */
  /* For example: for(;;) { } */

  for(;;){
	GPIO_DRV_ClearPinOutput(RGB_RedLed);			// On Red Led
	OSA_TimeDelay(300);
	GPIO_DRV_ClearPinOutput(RGB_GreenLed);			// On Green Led
	OSA_TimeDelay(300);
	GPIO_DRV_ClearPinOutput(RGB_BlueLed);			// On Blue Led
	OSA_TimeDelay(300);

	GPIO_DRV_SetPinOutput(RGB_RedLed);				// Off Red Led
	OSA_TimeDelay(300);
	GPIO_DRV_SetPinOutput(RGB_GreenLed);			// Off Green Led
	OSA_TimeDelay(300);
	GPIO_DRV_SetPinOutput(RGB_BlueLed);				// Off Blue Led
	OSA_TimeDelay(300);
  }


  /*** Don't write any code pass this line, or it will be deleted during code generation. ***/
  /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
  #ifdef PEX_RTOS_START
    PEX_RTOS_START();                  /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
  #endif
  /*** End of RTOS startup code.  ***/
  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
  for(;;){}
  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
static void AppTaskStart (void *p_arg)
{
  OS_ERR err;
  CPU_ERR cpu_err;
  uint32_t value;
  static uint32_t pulse_flag = 0;
  CPU_TS64 before, after;
  char tmp[80];
    
  (void)p_arg;

  CPU_Init();
  Mem_Init();
  Math_Init();

  BSP_Ser_Init(115200u);

    while (DEF_ON) {
        GPIO_DRV_TogglePinOutput( outPTB23 );
        value = GPIO_DRV_ReadPinInput( inPTB9 );
        if( value ){
            if(pulse_flag == 0)
                before = CPU_TS_Get64();    // in cpu_cfg.h must set: #define  CPU_CFG_TS_64_EN DEF_ENABLED
            pulse_flag = 1;
            GPIO_DRV_ClearPinOutput( BOARD_GPIO_LED_BLUE );
        }
        else{
            GPIO_DRV_SetPinOutput( BOARD_GPIO_LED_BLUE );
            if(pulse_flag == 1)
            {
                after = CPU_TS_Get64();     // see comment above
                sprintf( tmp, "Elapsed time in Task R = %f s\n\r", (float)((1.0*(after-before))/CPU_TS_TmrFreqGet( &cpu_err )) );
                APP_TRACE_DBG(( tmp ));
            }
            pulse_flag = 0;
        }
        OSTimeDlyHMSM(0u, 0u, 0u, 200u, OS_OPT_TIME_HMSM_STRICT, &err);
        
    }
}
/*FUNCTION**********************************************************************
 *
 * Function Name : SMARTCARD_DRV_NCN8025Deactivate
 * Description   : De-activates the smartcard interface
 *
 *END**************************************************************************/
void SMARTCARD_DRV_NCN8025Deactivate(uint32_t instance)
{
    assert(instance < HW_SMARTCARD_INSTANCE_COUNT);
    
    smartcard_state_t * smartcardStatePtr = (smartcard_state_t *)g_smartcardStatePtr[instance];
    smartcard_interface_slot_t * interfaceSlotParams = (smartcard_interface_slot_t *)(smartcardStatePtr->interfaceState->slot[smartcardStatePtr->interfaceConfig.cardSoltNo]);
#if defined(EMVSIM_INSTANCE_COUNT)
    EMVSIM_Type * base = g_emvsimBase[instance];
#endif
   
    /*Tell PHY to start Deactivation sequence by pulling CMD high*/
#if defined(EMVSIM_INSTANCE_COUNT)
    EMVSIM_HAL_ResetCard(base, kEmvsimResetAssert);
    EMVSIM_HAL_SetVCCEnable(base, true);
    EMVSIM_HAL_SetCardVCCEnablePolarity(base, kEmvsimVccEnIsHigh);
#else
    GPIO_DRV_SetPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.controlPort, (uint32_t)smartcardStatePtr->interfaceConfig.controlPin));
    GPIO_DRV_ClearPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.resetPort, (uint32_t)smartcardStatePtr->interfaceConfig.resetPin));
#endif
    
    /*  here the card was deactivated */
    interfaceSlotParams->active = false;
}
/*FUNCTION**********************************************************************
 *
 * Function Name : SMARTCARD_DRV_NCN8025Control
 * Description   : This function is used to differnet control interface/slot specific parameters
 *
 *END**************************************************************************/
void SMARTCARD_DRV_NCN8025Control(uint32_t instance, void *interfaceControl, void *param)
{
    assert(instance < HW_SMARTCARD_INSTANCE_COUNT);
    assert(interfaceControl);
    assert(param);
    
    smartcard_interface_control_t *interfaceControlPtr = (smartcard_interface_control_t *)interfaceControl;
    smartcard_state_t * smartcardStatePtr = (smartcard_state_t *)g_smartcardStatePtr[instance];
    smartcard_interface_slot_t * interfaceSlotParams = (smartcard_interface_slot_t *)(smartcardStatePtr->interfaceState->slot[smartcardStatePtr->interfaceConfig.cardSoltNo]);
    smartcard_card_voltage_class_t *vcc;
    uint32_t *clockToResetDelay;
    smartcard_interface_slot_t *statusParams;
#if defined(EMVSIM_INSTANCE_COUNT)
    EMVSIM_Type * base = g_emvsimBase[smartcardStatePtr->interfaceConfig.clockModuleInstance];
#endif
    
    switch(*interfaceControlPtr)
    {
    case kSmartcardInterfaceSetVcc:
        /* Set card parameter to VCC level set by caller */
        vcc = (smartcard_card_voltage_class_t *)param;
        smartcardStatePtr->cardParams.vcc = *vcc;
        interfaceSlotParams->vcc = *vcc;
        break;
    case kSmartcardInterfaceSetClockToResetDelay:
        /* Set interface clock to Reset delay set by caller */
        clockToResetDelay = (uint32_t *)param;
        interfaceSlotParams->clockToResetDelay = *clockToResetDelay;
        break;
    case kSmartcardInterfaceReadStatus:
        /* Read interface/card status */
        statusParams = (smartcard_interface_slot_t *)param;

#if defined(EMVSIM_INSTANCE_COUNT)
        /* Expecting active low present detect */
        statusParams->present = (EMVSIM_HAL_GetCardPresenceDetectPinStatus(base) == kEmvsimPDPinIsLow);
#else		
        if(GPIO_DRV_ReadPinInput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.controlPort, (uint32_t)smartcardStatePtr->interfaceConfig.controlPin)))
        {
            if(GPIO_DRV_ReadPinInput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.irqPort, (uint32_t)smartcardStatePtr->interfaceConfig.irqPin)))
            {
                /* CMDVCC is high => session is inactive and INT is high => card is present */
                statusParams->present = true;
                statusParams->active = false;
                statusParams->faulty = false;
                statusParams->status = MASK_NCN8025_STATUS_PRES;
            }
            else
            {
                /* CMDVCC is high => session is inactive and INT is low => card is absent */
                statusParams->present = false;
                statusParams->active = false;
                statusParams->faulty = false;
                statusParams->status = 0;
            }
        }
        else
        {
            if(GPIO_DRV_ReadPinInput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.irqPort, (uint32_t)smartcardStatePtr->interfaceConfig.irqPin)))
            {
                /* CMDVCC is low => session is active and INT is high => card is present */
                statusParams->present = true;
                statusParams->active = true;
                statusParams->faulty = false;
                statusParams->status = MASK_NCN8025_STATUS_PRES | MASK_NCN8025_STATUS_ACTIVE ;
            }
            else
            {
                /* CMDVCC is low => session is active and INT is low => card is absent/deactivated due to some fault */
                /* A fault has been detected (card has been deactivated) but The cause of the deactivation is not yet known.
                 * Lets determine the cause of fault by pulling CMD high 
                 */
                GPIO_DRV_SetPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.controlPort, (uint32_t)smartcardStatePtr->interfaceConfig.controlPin));
                
                if(GPIO_DRV_ReadPinInput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.irqPort, (uint32_t)smartcardStatePtr->interfaceConfig.irqPin)))
                {
                    /* The fault detected was not a card removal (card is still present) */
                    /* If INT follows CMDVCCN, the fault is due to a supply voltage drop, a VCC over-current detection or overheating. */
                    statusParams->present = true;
                    statusParams->active = false;
                    statusParams->faulty = true;
                    statusParams->status = MASK_NCN8025_STATUS_PRES | MASK_NCN8025_STATUS_FAULTY | MASK_NCN8025_STATUS_CARD_DEACTIVATED ;
                }
                else
                {
                    /* The fault detected was the card removal
                     * Setting CMDVCCN allows checking if the deactivation is due to card removal.
                     * In this case the INT pin will stay low after CMDVCCN is high.
                     */
                    statusParams->present = false;
                    statusParams->active = false;
                    statusParams->faulty = false;
                    statusParams->status = MASK_NCN8025_STATUS_CARD_REMOVED | MASK_NCN8025_STATUS_CARD_DEACTIVATED ;
                }
            }
        }
#endif

        /* Copying results back to caller buffer structure */
        interfaceSlotParams->present = statusParams->present;
        interfaceSlotParams->active = statusParams->active;
        interfaceSlotParams->faulty = statusParams->faulty;
        interfaceSlotParams->status = statusParams->status;
        break;
    default:
        break;
    }    
}
/*FUNCTION**********************************************************************
 *
 * Function Name : SMARTCARD_DRV_NCN8025Activate
 * Description   : Activates the smartcard interface
 *
 *END**************************************************************************/
void SMARTCARD_DRV_NCN8025Activate(uint32_t instance, smartcard_reset_type_t resetType)
{
    assert(instance < HW_SMARTCARD_INSTANCE_COUNT);
    
    smartcard_state_t * smartcardStatePtr = (smartcard_state_t *)g_smartcardStatePtr[instance];
    smartcard_interface_slot_t * interfaceSlotParams = (smartcard_interface_slot_t *)(smartcardStatePtr->interfaceState->slot[smartcardStatePtr->interfaceConfig.cardSoltNo]);
#if defined(EMVSIM_INSTANCE_COUNT)
    EMVSIM_Type * base = g_emvsimBase[instance];
#else
    uint32_t temp;
    UART_Type * base = g_uartBase[instance];
#endif

    smartcardStatePtr->timersState.initCharTimerExpired = false;
    smartcardStatePtr->resetType = resetType;

    /* Set data convention format into default direct mode */
#if defined(EMVSIM_INSTANCE_COUNT)
    smartcardStatePtr->cardParams.Fi = 372;
    smartcardStatePtr->cardParams.currentD = 1;
    EMVSIM_HAL_SetControl(base, kEmvsimCtrlInverseConvention, false);
    EMVSIM_HAL_SetBaudrateDivisor(base, (smartcardStatePtr->cardParams.Fi / smartcardStatePtr->cardParams.currentD));
#else
    UART_BWR_S2_RXINV(base, 0);
    UART_BWR_S2_MSBF(base, 0);
    UART_BWR_C3_TXINV(base, 0);
#endif

    if(resetType == kSmartcardColdReset)
    {
		/* Ensure that RST is LOW and CMD is high here so that PHY goes in normal mode */
#if defined(EMVSIM_INSTANCE_COUNT)
        EMVSIM_HAL_SetVCCEnable(base, true);
        EMVSIM_HAL_SetCardVCCEnablePolarity(base, kEmvsimVccEnIsHigh);
        EMVSIM_HAL_ResetCard(base, kEmvsimResetAssert);
#else
        GPIO_DRV_ClearPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.resetPort, (uint32_t)smartcardStatePtr->interfaceConfig.resetPin));
        GPIO_DRV_SetPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.controlPort, (uint32_t)smartcardStatePtr->interfaceConfig.controlPin));
#endif   
        if (smartcardStatePtr->cardParams.vcc == kSmartcardVoltageClassA5_0V)
        {
            /* vcc = 5v: vsel0=0,vsel1= 1 */
            GPIO_DRV_SetPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.vsel1Port, (uint32_t)smartcardStatePtr->interfaceConfig.vsel1Pin));
            GPIO_DRV_ClearPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.vsel0Port, (uint32_t)smartcardStatePtr->interfaceConfig.vsel0Pin));
        }
        else if (smartcardStatePtr->cardParams.vcc == kSmartcardVoltageClassB3_3V)
        {
            /* vcc = 3.3v: vsel0=x,vsel1= 0 */
            GPIO_DRV_ClearPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.vsel1Port, (uint32_t)smartcardStatePtr->interfaceConfig.vsel1Pin));
            GPIO_DRV_ClearPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.vsel0Port, (uint32_t)smartcardStatePtr->interfaceConfig.vsel0Pin));     
        }
        else
        {
            /* vcc = 1.8v: vsel0=1,vsel1= 1 */
            GPIO_DRV_SetPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.vsel1Port, (uint32_t)smartcardStatePtr->interfaceConfig.vsel1Pin));
            GPIO_DRV_SetPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.vsel0Port, (uint32_t)smartcardStatePtr->interfaceConfig.vsel0Pin)); 
        }
        
        /* Set PHY to start Activation sequence by pulling CMDVCC low */
#if defined(EMVSIM_INSTANCE_COUNT)
        EMVSIM_HAL_SetCardVCCEnablePolarity(base, kEmvsimVccEnIsLow);
#else
        GPIO_DRV_ClearPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.controlPort, (uint32_t)smartcardStatePtr->interfaceConfig.controlPin));
#endif
   
        /* Wait for sometime as specified by EMV before pulling RST High */        
        /* As per EMV delay <= 42000 Clock cycles
         * as per PHY delay >= 1us
         */
#if defined(EMVSIM_INSTANCE_COUNT)
        /* Down counter trigger, and clear any pending counter status flag */
        EMVSIM_HAL_SetControl(base, kEmvsimCtrlReceiverEnable, false);
        EMVSIM_HAL_ClearTransmitStatus(base, kEmvsimGPCNT1Timeout);
            
        /* Disable counter interrupt */
        EMVSIM_HAL_SetIntMode(base, kEmvsimIntGPCnt1, false);
        
        /* Set counter value */
        EMVSIM_HAL_SetGPCNTValue(base, 1, interfaceSlotParams->clockToResetDelay);
        
        /* Select the clock for GPCNT */
        EMVSIM_HAL_SetGPCClockSelect(base, 1, kEmvsimGPCCardClock);
        
        /* Trigger the counter */
        EMVSIM_HAL_SetControl(base, kEmvsimCtrlReceiverEnable, true);
        
        /* In polling mode */
        while(!EMVSIM_HAL_GetTransmitStatus(base, kEmvsimGPCNT1Timeout))
        {}
        
        /* Disable the counter */
        EMVSIM_HAL_SetGPCClockSelect(base, 1, kEmvsimGPCClockDisable);
        
        /* Down counter trigger, and clear any pending counter status flag */
        EMVSIM_HAL_SetControl(base, kEmvsimCtrlReceiverEnable, false);
        EMVSIM_HAL_ClearTransmitStatus(base, kEmvsimGPCNT1Timeout);
#else
        temp = (uint32_t)((float)(1 + (float)(((float)(1000*interfaceSlotParams->clockToResetDelay)) / ((float)smartcardStatePtr->interfaceConfig.sCClock))));
        OSA_TimeDelay(temp);
#endif
        
        /* Pull reset HIGH Now to mark the end of Activation sequence */
#if defined(EMVSIM_INSTANCE_COUNT)
        EMVSIM_HAL_ResetCard(base, kEmvsimResetDeassert);
#else
        GPIO_DRV_SetPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.resetPort, (uint32_t)smartcardStatePtr->interfaceConfig.resetPin));
#endif
    }
    else if(resetType == kSmartcardWarmReset)
    {
        /* Ensure that card is not already active */
        if(!interfaceSlotParams->active)
        {
            /* Card is not active;hence return */
            return;
        }
        /* Pull RESET low to start warm Activation sequence */
#if defined(EMVSIM_INSTANCE_COUNT)
        EMVSIM_HAL_ResetCard(base, kEmvsimResetAssert);
#else
        GPIO_DRV_ClearPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.resetPort, (uint32_t)smartcardStatePtr->interfaceConfig.resetPin));
#endif
        
        /* Wait for sometime as specified by EMV before pulling RST High */        
        /* As per EMV delay <= 42000 Clock cycles
         * as per PHY delay >= 1us
         */
#if defined(EMVSIM_INSTANCE_COUNT)   
        /* Down counter trigger, and clear any pending counter status flag */
        EMVSIM_HAL_SetControl(base, kEmvsimCtrlReceiverEnable, false);
        EMVSIM_HAL_ClearTransmitStatus(base, kEmvsimGPCNT1Timeout);
            
        /* Disable counter interrupt */
        EMVSIM_HAL_SetIntMode(base, kEmvsimIntGPCnt1, false);
        
        /* Set counter value */
        EMVSIM_HAL_SetGPCNTValue(base, 1, interfaceSlotParams->clockToResetDelay);
        
        /* Select the clock for GPCNT */
        EMVSIM_HAL_SetGPCClockSelect(base, 1, kEmvsimGPCCardClock);
        
        /* Trigger the counter */
        EMVSIM_HAL_SetControl(base, kEmvsimCtrlReceiverEnable, true);
        
        /* In polling mode */
        while(!EMVSIM_HAL_GetTransmitStatus(base, kEmvsimGPCNT1Timeout))
        {}
        
        /* Disable the counter */
        EMVSIM_HAL_SetGPCClockSelect(base, 1, kEmvsimGPCClockDisable);
        
        /* Down counter trigger, and clear any pending counter status flag */
        EMVSIM_HAL_SetControl(base, kEmvsimCtrlReceiverEnable, false);
        EMVSIM_HAL_ClearTransmitStatus(base, kEmvsimGPCNT1Timeout);
#else
        temp = (uint32_t)((float)(1 + (float)(((float)(1000*interfaceSlotParams->clockToResetDelay)) / ((float)smartcardStatePtr->interfaceConfig.sCClock))));
        OSA_TimeDelay(temp);
#endif
        
        /* Pull reset HIGH to mark the end of Activation sequence*/
#if defined(EMVSIM_INSTANCE_COUNT)
        EMVSIM_HAL_ResetCard(base, kEmvsimResetDeassert);
#else
        GPIO_DRV_SetPinOutput(GPIO_MAKE_PIN((uint32_t)smartcardStatePtr->interfaceConfig.resetPort, (uint32_t)smartcardStatePtr->interfaceConfig.resetPin));
#endif
    }
    
#if defined(EMVSIM_INSTANCE_COUNT)
    /* Down counter trigger, and clear any pending counter status flag */
    EMVSIM_HAL_SetControl(base, kEmvsimCtrlReceiverEnable, false);
    EMVSIM_HAL_ClearTransmitStatus(base, kEmvsimGPCNT0Timeout);
    EMVSIM_HAL_ClearTransmitStatus(base, kEmvsimGPCNT1Timeout);
    
    /* Set counter value for TS detection delay */
    EMVSIM_HAL_SetGPCNTValue(base, 0, (INIT_DELAY_CLOCK_CYCLES + INIT_DELAY_CLOCK_CYCLES_ADJUSTMENT));
    
    /* Pre-load counter value for ATR duration delay */
    EMVSIM_HAL_SetGPCNTValue(base, 1, (EMV_ATR_DURATION_ETU + ATR_DURATION_ADJUSTMENT));
    
    /* Select the clock for GPCNT for both TS detection and early start of ATR duration counter */
    EMVSIM_HAL_SetGPCClockSelect(base, 0, kEmvsimGPCCardClock);
    EMVSIM_HAL_SetGPCClockSelect(base, 1, kEmvsimGPCTxClock);
    
    /* Enable counter interrupt for TS detection */
    EMVSIM_HAL_SetIntMode(base, kEmvsimIntGPCnt0, true);
        
    /* Trigger the counter */
    EMVSIM_HAL_SetControl(base, kEmvsimCtrlReceiverEnable, true);
#endif

    /*  Here the card was activated */
    interfaceSlotParams->active = true;
}
static void LED_turnoff_slave(void)
{
    GPIO_DRV_SetPinOutput(kGpioLED2);
}
static void LED_turnoff_master(void)
{
    GPIO_DRV_SetPinOutput(kGpioLED1);
}