📄 init.s
字号:
.module init.c
.area text(rom, con, rel)
.dbfile F:\ouravr\ds3231\init.c
.dbfunc e port_init _port_init fV
.even
_port_init::
.dbline -1
.dbline 9
; //ICC-AVR application builder : 2006-3-27 13:01:28
; // Target : M16
; // Crystal: 8.0000Mhz
;
; #include <iom16v.h>
; #include <macros.h>
;
; void port_init(void)
; {
.dbline 11
;
; PORTA = 0xC0;
ldi R24,192
out 0x1b,R24
.dbline 12
; DDRA = 0xC0;
out 0x1a,R24
.dbline 13
; PORTB = 0x00;
clr R2
out 0x18,R2
.dbline 14
; DDRB = 0x00;
out 0x17,R2
.dbline 15
; PORTC = 0xFF; //m103 output only
ldi R24,255
out 0x15,R24
.dbline 16
; DDRC = 0xFF;
out 0x14,R24
.dbline 17
; PORTD = 0x00;
out 0x12,R2
.dbline 18
; DDRD = 0x0C;
ldi R24,12
out 0x11,R24
.dbline -2
L1:
.dbline 0 ; func end
ret
.dbend
.dbfunc e init_devices _init_devices fV
.even
_init_devices::
.dbline -1
.dbline 23
; }
;
; //call this routine to initialize all peripherals
; void init_devices(void)
; {
.dbline 25
; //stop errant interrupts until set up
; CLI(); //disable all interrupts
cli
.dbline 26
; port_init();
rcall _port_init
.dbline 28
;
; MCUCR = 0x00;
clr R2
out 0x35,R2
.dbline 29
; GICR = 0x00;
out 0x3b,R2
.dbline 30
; TIMSK = 0x00; //timer interrupt sources
out 0x39,R2
.dbline -2
L2:
.dbline 0 ; func end
ret
.dbend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -