avr: reduced code (bootloader now 569 words).
This commit is contained in:
@@ -79,10 +79,8 @@ bootLoader:
|
||||
cbi COM_DDR_ATTN, COM_PINNUM_ATTN ; set ATTN port as input
|
||||
|
||||
|
||||
sbi DDRA, PORTA3 ; out
|
||||
cbi PORTA, PORTA3 ; on
|
||||
cbi DDRA, PORTA2 ; in (debug led)
|
||||
sbi PORTA, PORTA2 ; pullup on (debug led)
|
||||
sbi LED_DDR, LED_PINNUM ; out
|
||||
cbi LED_PORT, LED_PINNUM ; on
|
||||
|
||||
rcall flashReadUid
|
||||
sts flashUid, r18
|
||||
@@ -101,20 +99,20 @@ bootLoader:
|
||||
|
||||
; try to start firmware
|
||||
bootLoader_startFirmware:
|
||||
cbi PORTA, PORTA3 ; LED on
|
||||
cbi LED_PORT, LED_PINNUM ; on
|
||||
ldi r16, 10
|
||||
rcall flashWaitForMulti100ms
|
||||
sbi PORTA, PORTA3 ; LED off
|
||||
sbi LED_PORT, LED_PINNUM ; off
|
||||
ldi r16, 3
|
||||
rcall flashWaitForMulti100ms
|
||||
cbi PORTA, PORTA3 ; LED on
|
||||
cbi LED_PORT, LED_PINNUM ; on
|
||||
ldi r16, 10
|
||||
rcall flashWaitForMulti100ms
|
||||
sbi PORTA, PORTA3 ; LED off
|
||||
sbi LED_PORT, LED_PINNUM ; off
|
||||
rjmp firmwareStart
|
||||
|
||||
bootLoader_waitAndRestartBootLoader:
|
||||
sbi PORTA, PORTA3 ; LED off
|
||||
sbi LED_PORT, LED_PINNUM ; off
|
||||
ldi r16, 20
|
||||
rcall flashWaitForMulti100ms
|
||||
rjmp bootLoader
|
||||
|
||||
Reference in New Issue
Block a user