/* This function starts the SimpleLink in the configured role. The device notifies the host asynchronously when the initialization is completed.  */
static int32_t InitSimplelink(uint8_t const role)
/* This function starts the SimpleLink in the configured role. The device notifies the host asynchronously when the initialization is completed.  */
static int32_t InitSimplelink(uint8_t const role)
{
    Provisioning_AppContext *const pCtx = &gAppCtx;
    int32_t retVal = -1;
    pCtx->role = role;
    pCtx->pendingEvents = 0;
    retVal = sl_Start(0, 0, (P_INIT_CALLBACK)SimpleLinkInitCallback);
    ASSERT_ON_ERROR(retVal);
    pCtx->asyncEvtTimeout = ASYNC_EVT_TIMEOUT;
    retVal = StartAsyncEvtTimer(pCtx->asyncEvtTimeout);
    ASSERT_ON_ERROR(retVal);
    return (retVal);
}