Beispiel #1
0
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);
};
/*********************************************************************
 * @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));

  /* 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 );
}