1
0
mirror of https://github.com/Utyff/Zintercom.git synced 2026-01-12 09:17:41 +03:00
Files
Zintercom/Source/OSAL_App.c
lost 8ac322e25f v0.1
fixed the work of inputs and outputs on the target board (button and call)
implemented sleep mode in battery mode (end device)
power attributes are always advertised, (used only in battery mode)
implemented bind to another device (notify about a call to the intercom)
minor changes in the code (syntactic)
2021-01-15 17:25:53 +02:00

71 lines
2.0 KiB
C

#include "OSAL.h"
#include "OSAL_Tasks.h"
#include "ZComDef.h"
#include "hal_drivers.h"
#include "APS.h"
#include "ZDApp.h"
#include "nwk.h"
#if defined ( MT_TASK )
#include "MT.h"
#include "MT_TASK.h"
#endif
#include "commissioning.h"
#include "factory_reset.h"
#include "Debug.h"
#include "battery.h"
#include "bdb_interface.h"
#include "zcl_app.h"
const pTaskEventHandlerFn tasksArr[] = {macEventLoop,
nwk_event_loop,
Hal_ProcessEvent,
#if defined( MT_TASK )
MT_ProcessEvent,
#endif
APS_event_loop,
ZDApp_event_loop,
zcl_event_loop,
bdb_event_loop,
zclApp_event_loop,
zclCommissioning_event_loop,
zclFactoryResetter_loop
#ifdef ZIC_BATTERY_MODE
,
zclBattery_event_loop
#endif
};
const uint8 tasksCnt = sizeof(tasksArr) / sizeof(tasksArr[0]);
uint16 *tasksEvents;
void osalInitTasks(void) {
uint8 taskID = 0;
DebugInit();
tasksEvents = (uint16 *)osal_mem_alloc(sizeof(uint16) * tasksCnt);
osal_memset(tasksEvents, 0, (sizeof(uint16) * tasksCnt));
macTaskInit(taskID++);
nwk_init(taskID++);
Hal_Init(taskID++);
#if defined( MT_TASK )
MT_TaskInit( taskID++ );
#endif
APS_Init(taskID++);
ZDApp_Init(taskID++);
zcl_Init(taskID++);
bdb_Init(taskID++);
zclApp_Init(taskID++);
zclCommissioning_Init(taskID++);
zclFactoryResetter_Init(taskID++);
#if defined( ZIC_BATTERY_MODE )
zclBattery_Init(taskID++);
#endif
}
/*********************************************************************
*********************************************************************/