/********************************************************************* * @fn osalInitTasks * * @brief This function invokes the initialization function for each task. * * @param void * * @return none */ void osalInitTasks( void ) { uint8 taskID = 0; tasksEvents = (uint16 *)osal_mem_alloc( sizeof( uint16 ) * tasksCnt); osal_memset( tasksEvents, 0, (sizeof( uint16 ) * tasksCnt)); /* LL Task */ LL_Init( taskID++ ); /* Hal Task */ Hal_Init( taskID++ ); /* HCI Task */ HCI_Init( taskID++ ); #if defined ( OSAL_CBTIMER_NUM_TASKS ) /* Callback Timer Tasks */ osal_CbTimerInit( taskID ); taskID += OSAL_CBTIMER_NUM_TASKS; #endif /* GAP Task */ GAP_Init( taskID++ ); /* Profiles */ GAPRole_Init( taskID++ ); /* Application */ SimpleBLEBroadcaster_Init( taskID ); }
/********************************************************************* * @fn osalInitTasks * * @brief This function invokes the initialization function for each task. * * @param void * * @return none */ void osalInitTasks( void ) { uint8 taskID = 0; tasksEvents = (uint16 *)osal_mem_alloc( sizeof( uint16 ) * tasksCnt); osal_memset( tasksEvents, 0, (sizeof( uint16 ) * tasksCnt)); /* Hal Task */ Hal_Init( taskID++ ); #if defined ( OSAL_CBTIMER_NUM_TASKS ) /* Callback Timer Tasks */ osal_CbTimerInit( taskID ); taskID += OSAL_CBTIMER_NUM_TASKS; #endif /* L2CAP Task */ L2CAP_Init( taskID++ ); /* SMP Task */ SMP_Init( taskID++ ); /* GAP Task */ GAP_Init( taskID++ ); /* uApp Task */ uApp_Init( taskID++ ); /* GAP Test Task */ GAPApp_Init( taskID ); }
void osalInitTasks(void) { uint8 taskID = 0; tasksEvents = (uint16*)osal_mem_alloc(sizeof(uint16) * tasksCnt); osal_memset(tasksEvents, 0, (sizeof(uint16) * tasksCnt)); LL_Init(taskID++); Hal_Init(taskID++); HCI_Init(taskID++); #if defined (OSAL_CBTIMER_NUM_TASKS) osal_CbTimerInit(taskID); taskID += OSAL_CBTIMER_NUM_TASKS; #endif L2CAP_Init( taskID++ ); GAP_Init(taskID++); GATT_Init(taskID++); SM_Init(taskID++); GAPRole_Init(taskID++); GAPBondMgr_Init(taskID++); GATTServApp_Init(taskID++); RemotePeripheralInit(taskID); };
/** * @brief main() is the entry of user code. * * * @return void */ int Testlegacy_main(void) { Board_Init(); Driver_Init(); legacy_Init(); GAP_Init(); Profile_Init(); PwrMgr_Init(); Task_Init(); //vTaskStartScheduler(); return 0; }
/********************************************************************* * @fn osalInitTasks * * @brief This function invokes the initialization function for each task. * * @param void * * @return none */ void osalInitTasks( void ) { uint8 taskID = 0; tasksEvents = (uint16 *)osal_mem_alloc( sizeof( uint16 ) * tasksCnt); VOID osal_memset( tasksEvents, 0, (sizeof( uint16 ) * tasksCnt)); /* LL Task */ LL_Init( taskID++ ); /* Hal Task */ Hal_Init( taskID++ ); /* HCI Task */ HCI_Init( taskID++ ); #if defined ( OSAL_CBTIMER_NUM_TASKS ) /* Callback Timer Tasks */ osal_CbTimerInit( taskID ); taskID += OSAL_CBTIMER_NUM_TASKS; #endif /* L2CAP Task */ L2CAP_Init( taskID++ ); /* GAP Task */ GAP_Init( taskID++ ); /* SM Task */ SM_Init( taskID++ ); /* GATT Task */ GATT_Init( taskID++ ); #if !defined ( GATT_DB_OFF_CHIP ) /* GATT Server App Task */ GATTServApp_Init( taskID++ ); #if defined ( GATT_TEST ) /* GATT Test Task */ GATTTest_Init( taskID++ ); #endif #endif // GATT_DB_OFF_CHIP #if defined ( GAP_BOND_MGR ) GAPBondMgr_Init( taskID++ ); #endif /* HCI Extension GAP Task */ HCI_EXT_App_Init( taskID ); }
/********************************************************************* * @fn osalInitTasks * * @brief This function invokes the initialization function for each task. * * @param void * * @return none */ void osalInitTasks( void ) { uint8 taskID = 0; tasksEvents = (uint16 *)osal_mem_alloc( sizeof( uint16 ) * tasksCnt); osal_memset( tasksEvents, 0, (sizeof( uint16 ) * tasksCnt)); /* LL Task */ LL_Init( taskID++ ); /* Hal Task */ Hal_Init( taskID++ ); /* HCI Task */ HCI_Init( taskID++ ); #if defined ( OSAL_CBTIMER_NUM_TASKS ) /* Callback Timer Tasks */ osal_CbTimerInit( taskID ); taskID += OSAL_CBTIMER_NUM_TASKS; #endif /* L2CAP Task */ L2CAP_Init( taskID++ ); /* GAP Task */ GAP_Init( taskID++ ); /* GATT Task */ GATT_Init( taskID++ ); /* SM Task */ SM_Init( taskID++ ); /* Profiles */ GAPCentralRole_Init( taskID++ ); GAPBondMgr_Init( taskID++ ); /* Application */ #if defined ( ZIGBEE_APP ) Zigbee_Init( taskID++ ); #endif #if defined _XBEE_APP_ XBeeInit(taskID ++); Hidapp_Init( taskID ); #endif //SimpleBLEPeripheral_Init( taskID ); }
/********************************************************************* * @fn osalInitTasks * * @brief This function invokes the initialization function for each task. * * @param void * * @return none */ void osalInitTasks( void ) { ICall_EntityID entity; ICall_Semaphore sem; uint8 taskID = 0; uint8 i; tasksEvents = (uint16 *)osal_mem_alloc( sizeof( uint16 ) * tasksCnt); osal_memset( tasksEvents, 0, (sizeof( uint16 ) * tasksCnt)); /* LL Task */ LL_Init( taskID++ ); /* HCI Task */ HCI_Init( taskID++ ); #if defined ( OSAL_CBTIMER_NUM_TASKS ) /* Callback Timer Tasks */ osal_CbTimerInit( taskID ); taskID += OSAL_CBTIMER_NUM_TASKS; #endif /* GAP Task */ GAP_Init( taskID++ ); /* ICall BLE Dispatcher Task */ bleDispatch_Init( taskID ); // ICall enrollment /* Enroll the service that this stack represents */ ICall_enrollService(ICALL_SERVICE_CLASS_BLE, NULL, &entity, &sem); /* Enroll the obtained dispatcher entity and OSAL task ID of HCI Ext App * to OSAL so that OSAL can route the dispatcher message into * the appropriate OSAL task. */ osal_enroll_dispatchid(taskID, entity); /* Register all other OSAL tasks to use the registered dispatcher entity * ID as the source of dispatcher messages, even though the other OSAL * tasks didn't register themselves to receive messages from application. */ for (i = 0; i < taskID; i++) { osal_enroll_senderid(i, entity); } }
/********************************************************************* * @fn osalInitTasks * * @brief This function invokes the initialization function for each task. * * @param void * * @return none */ void osalInitTasks( void ) { uint8 taskID = 0; tasksEvents = (uint16 *)osal_mem_alloc( sizeof( uint16 ) * tasksCnt); osal_memset( tasksEvents, 0, (sizeof( uint16 ) * tasksCnt)); /* LL Task */ LL_Init( taskID++ ); /* Hal Task */ Hal_Init( taskID++ ); /* HCI Task */ HCI_Init( taskID++ ); #if defined ( OSAL_CBTIMER_NUM_TASKS ) /* Callback Timer Tasks */ osal_CbTimerInit( taskID ); taskID += OSAL_CBTIMER_NUM_TASKS; #endif /* L2CAP Task */ L2CAP_Init( taskID++ ); /* GAP Task */ GAP_Init( taskID++ ); /* GATT Task */ GATT_Init( taskID++ ); /* SM Task */ SM_Init( taskID++ ); /* Profiles */ GAPRole_Init( taskID++ ); GAPBondMgr_Init( taskID++ ); GATTServApp_Init( taskID++ ); HidDev_Init( taskID++ ); /* Application */ HidKbdMouse_Init( taskID ); }
static void GapAttrInit(void) { GAP_Init(); }