avr: started adding COM2WN module.
This commit is contained in:
@@ -119,6 +119,20 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef MODULES_COM2WN
|
||||||
|
.include "modules/com2w/defs.asm"
|
||||||
|
.include "modules/com2w/com2wn_init.asm"
|
||||||
|
.include "modules/com2w/com2wn_io.asm"
|
||||||
|
.include "modules/com2w/com2wn_irq.asm"
|
||||||
|
.include "modules/com2w/com2wn_recv.asm"
|
||||||
|
.include "modules/com2w/com2wn_run.asm"
|
||||||
|
.include "modules/com2w/com2wn_send.asm"
|
||||||
|
.include "modules/com2w/com2wn_wait.asm"
|
||||||
|
.include "modules/com2w/com2wn_data.asm"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef MODULES_CLOCK
|
#ifdef MODULES_CLOCK
|
||||||
.include "modules/clock/main.asm"
|
.include "modules/clock/main.asm"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -148,6 +148,11 @@ onSystemTimerTick:
|
|||||||
bigcall COM2W1_Periodically
|
bigcall COM2W1_Periodically
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef MODULES_COM2WN
|
||||||
|
bigcall COM2WN_Periodically
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef MODULES_TCRT1000
|
#ifdef MODULES_TCRT1000
|
||||||
bigcall TCRT1K_Every100ms
|
bigcall TCRT1K_Every100ms
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -93,6 +93,11 @@ initModules:
|
|||||||
bigcall COM2W1_Init
|
bigcall COM2W1_Init
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef MODULES_COM2WN
|
||||||
|
bigcall COM2WN_Init
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef MODULES_MOTION
|
#ifdef MODULES_MOTION
|
||||||
bigcall Motion_Init
|
bigcall Motion_Init
|
||||||
#endif
|
#endif
|
||||||
@@ -250,6 +255,13 @@ runComModules_loop:
|
|||||||
sbci r16, 0
|
sbci r16, 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef MODULES_COM2WN
|
||||||
|
push r16
|
||||||
|
bigcall COM2WN_Run
|
||||||
|
pop r16
|
||||||
|
sbci r16, 0
|
||||||
|
#endif
|
||||||
|
|
||||||
pop r17
|
pop r17
|
||||||
; check for repeat request
|
; check for repeat request
|
||||||
tst r16
|
tst r16
|
||||||
|
|||||||
@@ -47,7 +47,8 @@
|
|||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; generic
|
; generic
|
||||||
|
|
||||||
.equ NET_BUFFERS_NUM = 6
|
.equ NET_BUFFERS_NUM = 6
|
||||||
|
.equ COM2WN_IO_RINGBUFFER_SIZE = 128
|
||||||
|
|
||||||
.equ PROGRAM_SENSOR_INTERVAL_SECS = 60
|
.equ PROGRAM_SENSOR_INTERVAL_SECS = 60
|
||||||
.equ PROGRAM_STATS_INTERVAL_MINS = 10
|
.equ PROGRAM_STATS_INTERVAL_MINS = 10
|
||||||
@@ -62,7 +63,7 @@
|
|||||||
#define MODULES_LED_SIMPLE
|
#define MODULES_LED_SIMPLE
|
||||||
#define MODULES_NETWORK
|
#define MODULES_NETWORK
|
||||||
;#define MODULES_UART_BITBANG
|
;#define MODULES_UART_BITBANG
|
||||||
#define MODULES_COM2WG
|
#define MODULES_COM2WN
|
||||||
;#define MODULES_TWI_MASTER
|
;#define MODULES_TWI_MASTER
|
||||||
;#define MODULES_LCD
|
;#define MODULES_LCD
|
||||||
;#define LCD_MINIMAL_FONT
|
;#define LCD_MINIMAL_FONT
|
||||||
@@ -122,10 +123,9 @@
|
|||||||
; Reset and interrupt vectors (will be removed as soon as we can flash data over COM)
|
; Reset and interrupt vectors (will be removed as soon as we can flash data over COM)
|
||||||
|
|
||||||
; rjmp main ; Reset vector
|
; rjmp main ; Reset vector
|
||||||
rjmp BOOTLOADER_ADDR ; Reset vector ; use this for flashed system
|
rjmp BOOTLOADER_ADDR ; Reset vector ; use this for flashed system
|
||||||
reti ; EXT_INT0
|
reti ; EXT_INT0
|
||||||
; rjmp UART_BitBang_PcintIsr ; PCI0
|
rjmp COM2WN_ClkChangeIsr ; PCI0
|
||||||
rjmp com2wPcintIsr ; PCI0
|
|
||||||
reti ; PCI1
|
reti ; PCI1
|
||||||
reti ; WATCHDOG
|
reti ; WATCHDOG
|
||||||
reti ; ICP1
|
reti ; ICP1
|
||||||
|
|||||||
Reference in New Issue
Block a user