avr/devices/all: started integrating code from t03.

This commit is contained in:
Martin Preuss
2025-05-08 17:14:33 +02:00
parent cc7ef0cf30
commit 64e2cf5d25
19 changed files with 1544 additions and 100 deletions

View File

@@ -57,6 +57,14 @@ initModules:
rcall UART_BitBang_Init
#endif
#ifdef MODULES_TTYONUART1
rcall TtyOnUart1_Init
#endif
#ifdef MODULES_COMONUART0
rcall ComOnUart0_Init
#endif
#ifdef MODULES_MOTION
rcall Motion_Init
#endif
@@ -111,6 +119,7 @@ initModules:
rcall CCS811_Init
#endif
; done
ret
; @end
@@ -142,7 +151,14 @@ runModules_Com:
dec r16
brne runModules_Com
runModules_ComEnd:
#endif
#ifdef MODULES_TTYONUART1
rcall TtyOnUart1_Run
#endif
#ifdef MODULES_COMONUART0
rcall ComOnUart0_Run
#endif
#ifdef MODULES_STATS
@@ -172,44 +188,16 @@ runModules_ComEnd:
#ifdef MODULES_NETWORK
; ---------------------------------------------------------------------------
; @routine handleMessages
handleMessages:
rcall NET_GetNextIncomingMsgNum ; R16=msg num
brcc handleMessages_end
rcall NET_Buffer_Locate ; X=buffer addr (R17)
adiw xh:xl, 1
push r16
rcall onMessageReceived
mainModulesOnPacketReceived:
#ifdef MODULES_SK6812
rcall SK6812_OnPacketReceived
#endif
#ifdef APPS_NETWORK
; handle messages
ldi yl, LOW(netInterfaceData)
ldi yh, HIGH(netInterfaceData)
rcall AppNetwork_HandleMsg
#endif
; add more here
#ifdef APPS_MA_LIGHT
rcall AppMotionLight_OnPacketReceived
#endif
; add more here
pop r16
rcall NET_Buffer_ReleaseByNum
sec
handleMessages_end:
ret
; @end
#endif