start using new COM module in n27, r05 and t03.
This commit is contained in:
@@ -74,7 +74,8 @@
|
||||
;#define MODULES_DS18B20
|
||||
;#define MODULES_MOTION
|
||||
#define MODULES_NETWORK
|
||||
#define MODULES_COMONUART0
|
||||
#define MODULES_COM2W
|
||||
;#define MODULES_COMONUART0
|
||||
#define MODULES_TTYONUART1
|
||||
#define APPS_STATS
|
||||
#define APPS_NETWORK
|
||||
@@ -109,7 +110,8 @@
|
||||
|
||||
rjmp BOOTLOADER_ADDR ; 1: RESET Reset vector use this for flashed system
|
||||
reti ; 2: INT0 External Interrupt Request 0
|
||||
rjmp ComOnUart0_AttnChangeIsr ; 3: PCINT0 Pin Change Interrupt 0
|
||||
; rjmp COM2W1_ClkChangeIsr ; 3: PCINT0 Pin Change Interrupt 0
|
||||
rjmp com2wPcintIsr ; 3: PCINT0 Pin Change Interrupt 0
|
||||
reti ; 4: PCINT1 Pin Change Interrupt 1
|
||||
reti ; 5: WDT Watchdog Time-out
|
||||
reti ; 6: TIM1_CAPT Timer/Counter1 Capture Event
|
||||
@@ -129,7 +131,8 @@
|
||||
reti ; 20: TIM2_OVF (OVF2) Timer/Counter2 Overflow
|
||||
reti ; 21: SPI SPI Serial Transfer Complete
|
||||
reti ; 22: USART0_RXS USART0 Rx Start
|
||||
rjmp ComOnUart0_RxCharIsr ; 23: USART0_RXC USART0 Rx Complete
|
||||
; rjmp ComOnUart0_RxCharIsr ; 23: USART0_RXC USART0 Rx Complete
|
||||
reti ; 23: USART0_RXC USART0 Rx Complete
|
||||
reti ; 24: USART0_DRE USART0 Data Register Empty
|
||||
reti ; 25: USART0_TXC USART0 Tx Complete
|
||||
reti ; 26: USART1_RXS USART1 Rx Start
|
||||
@@ -165,7 +168,7 @@ firmwareStart:
|
||||
onSystemStart:
|
||||
; set interface number for UART0
|
||||
ldi r16, COMONUART0_IFACENUM
|
||||
sts comOnUart0_iface+NET_IFACE_OFFS_IFACENUM, r16
|
||||
sts netInterfaceData2+NET_IFACE_OFFS_IFACENUM, r16
|
||||
; set interface number for UART1
|
||||
ldi r16, TTYONUART1_IFACENUM
|
||||
sts ttyOnUart1_iface+NET_IFACE_OFFS_IFACENUM, r16
|
||||
@@ -246,7 +249,7 @@ letSysHandleMsg:
|
||||
ld r16, X
|
||||
cpi r16, 0xff
|
||||
breq letSysHandleMsg_forMe
|
||||
lds r17, comOnUart0_iface+NET_IFACE_OFFS_ADDRESS
|
||||
lds r17, netInterfaceData2+NET_IFACE_OFFS_ADDRESS
|
||||
cp r16, r17
|
||||
brne letSysHandleMsg_end
|
||||
letSysHandleMsg_forMe:
|
||||
@@ -304,8 +307,8 @@ addMsgToInterface:
|
||||
clc
|
||||
ret
|
||||
addMsgToInterface_toUart0:
|
||||
ldi yl, LOW(comOnUart0_iface)
|
||||
ldi yh, HIGH(comOnUart0_iface)
|
||||
ldi yl, LOW(netInterfaceData2)
|
||||
ldi yh, HIGH(netInterfaceData2)
|
||||
rjmp NET_Interface_AddOutgoingMsgNum ; try to add msg to interface
|
||||
addMsgToInterface_toUart1:
|
||||
ldi yl, LOW(ttyOnUart1_iface)
|
||||
@@ -332,5 +335,6 @@ addMsgToInterface_toUart1:
|
||||
; defines for network interface
|
||||
|
||||
.equ netInterfaceData = ttyOnUart1_iface
|
||||
.equ netInterfaceData2 = comOnUart0_iface
|
||||
;.equ netInterfaceData2 = comOnUart0_iface
|
||||
.equ netInterfaceData2 = com2w_iface
|
||||
|
||||
|
||||
Reference in New Issue
Block a user