97 lines
1.8 KiB
NASM
97 lines
1.8 KiB
NASM
; ***************************************************************************
|
|
; copyright : (C) 2025 by Martin Preuss
|
|
; email : martin@libchipcard.de
|
|
;
|
|
; ***************************************************************************
|
|
; * This file is part of the project "AqHome". *
|
|
; * Please see toplevel file COPYING of that project for license details. *
|
|
; ***************************************************************************
|
|
|
|
|
|
; ***************************************************************************
|
|
; code
|
|
|
|
|
|
.cseg
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
; @routine initApps
|
|
;
|
|
; Call init functions of the used apps. Add your routine calls here.
|
|
|
|
initApps:
|
|
|
|
#ifdef APPS_NETWORK
|
|
ldi yl, LOW(netInterfaceData)
|
|
ldi yh, HIGH(netInterfaceData)
|
|
bigcall AppNetwork_Init
|
|
#endif
|
|
|
|
#ifdef APPS_MOTION
|
|
bigcall AppMotion_Init
|
|
#endif
|
|
|
|
#ifdef APPS_DOOR
|
|
bigcall AppDoor_Init
|
|
#endif
|
|
|
|
#ifdef APPS_REPORTSENSORS
|
|
bigcall AppReportSensors_Init
|
|
#endif
|
|
|
|
#ifdef APPS_STATS
|
|
bigcall AppStats_Init
|
|
#endif
|
|
|
|
#ifdef APPS_MA_LIGHT
|
|
bigcall AppMotionLight_Init
|
|
#endif
|
|
|
|
; done
|
|
ret
|
|
; @end
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
; @routine runApps
|
|
;
|
|
; Call run functions of the used modules. Add your routine calls here.
|
|
;
|
|
|
|
runApps:
|
|
|
|
; add more modules here
|
|
ret
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
; @routine mainAppsOnPacketReceived
|
|
;
|
|
; Let all apps handle received message.
|
|
|
|
mainAppsOnPacketReceived:
|
|
#ifdef APPS_NETWORK
|
|
; handle messages
|
|
ldi yl, LOW(netInterfaceData)
|
|
ldi yh, HIGH(netInterfaceData)
|
|
bigcall AppNetwork_HandleMsg
|
|
#endif
|
|
|
|
#ifdef APPS_MA_LIGHT
|
|
bigcall AppMotionLight_OnPacketReceived
|
|
#endif
|
|
|
|
; add more here
|
|
|
|
ret
|
|
; @end
|
|
|
|
|
|
|
|
|
|
|