Subversion Repositories svnkaklik

Rev

Rev 174 | Rev 409 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 174 Rev 182
Line 1... Line 1...
1
GAS LISTING /tmp/ccQb65z2.s 			page 1
1
GAS LISTING /tmp/ccZHfAgR.s 			page 1
2
 
2
 
3
 
3
 
4
   1               		.file	"I2CInterface.c"
4
   1               		.file	"I2CInterface.c"
5
   2               		.arch atmega8
5
   2               		.arch atmega8
6
   3               	__SREG__ = 0x3f
6
   3               	__SREG__ = 0x3f
Line 56... Line 56...
56
  53               		.stabs	"uint_fast8_t:t(4,20)=(4,2)",128,0,205,0
56
  53               		.stabs	"uint_fast8_t:t(4,20)=(4,2)",128,0,205,0
57
  54               		.stabs	"int_fast16_t:t(4,21)=(4,3)",128,0,210,0
57
  54               		.stabs	"int_fast16_t:t(4,21)=(4,3)",128,0,210,0
58
  55               		.stabs	"uint_fast16_t:t(4,22)=(4,4)",128,0,215,0
58
  55               		.stabs	"uint_fast16_t:t(4,22)=(4,4)",128,0,215,0
59
  56               		.stabs	"int_fast32_t:t(4,23)=(4,5)",128,0,220,0
59
  56               		.stabs	"int_fast32_t:t(4,23)=(4,5)",128,0,220,0
60
  57               		.stabs	"uint_fast32_t:t(4,24)=(4,6)",128,0,225,0
60
  57               		.stabs	"uint_fast32_t:t(4,24)=(4,6)",128,0,225,0
61
GAS LISTING /tmp/ccQb65z2.s 			page 2
61
GAS LISTING /tmp/ccZHfAgR.s 			page 2
62
 
62
 
63
 
63
 
64
  58               		.stabs	"int_fast64_t:t(4,25)=(4,7)",128,0,230,0
64
  58               		.stabs	"int_fast64_t:t(4,25)=(4,7)",128,0,230,0
65
  59               		.stabs	"uint_fast64_t:t(4,26)=(4,8)",128,0,235,0
65
  59               		.stabs	"uint_fast64_t:t(4,26)=(4,8)",128,0,235,0
66
  60               		.stabs	"intmax_t:t(4,27)=(4,7)",128,0,249,0
66
  60               		.stabs	"intmax_t:t(4,27)=(4,7)",128,0,249,0
Line 116... Line 116...
116
  30:I2CInterface.c **** 	
116
  30:I2CInterface.c **** 	
117
  31:I2CInterface.c **** 	Description: This module is responsible for providing a
117
  31:I2CInterface.c **** 	Description: This module is responsible for providing a
118
  32:I2CInterface.c **** 	low-level interface to the I2C hardware resident on the
118
  32:I2CInterface.c **** 	low-level interface to the I2C hardware resident on the
119
  33:I2CInterface.c **** 	mega8 processor (also known as the Two-Wire Interface,
119
  33:I2CInterface.c **** 	mega8 processor (also known as the Two-Wire Interface,
120
  34:I2CInterface.c **** 	or TWI).  The interface is needed to configure the
120
  34:I2CInterface.c **** 	or TWI).  The interface is needed to configure the
121
GAS LISTING /tmp/ccQb65z2.s 			page 3
121
GAS LISTING /tmp/ccZHfAgR.s 			page 3
122
 
122
 
123
 
123
 
124
  35:I2CInterface.c **** 	needed registers in the OV6620 camera.  This interface
124
  35:I2CInterface.c **** 	needed registers in the OV6620 camera.  This interface
125
  36:I2CInterface.c **** 	is interrupt-driven based on the events that should
125
  36:I2CInterface.c **** 	is interrupt-driven based on the events that should
126
  37:I2CInterface.c **** 	occur upon successful writing of an I2C register.
126
  37:I2CInterface.c **** 	occur upon successful writing of an I2C register.
Line 176... Line 176...
176
  82               	.LM0:
176
  82               	.LM0:
177
  83               	/* prologue: frame size=0 */
177
  83               	/* prologue: frame size=0 */
178
  84               	/* prologue end (size=0) */
178
  84               	/* prologue end (size=0) */
179
  86:I2CInterface.c **** 	TWSR = 0;
179
  86:I2CInterface.c **** 	TWSR = 0;
180
  85               		.stabn	68,0,86,.LM1-I2CInt_init
180
  85               		.stabn	68,0,86,.LM1-I2CInt_init
181
GAS LISTING /tmp/ccQb65z2.s 			page 4
181
GAS LISTING /tmp/ccZHfAgR.s 			page 4
182
 
182
 
183
 
183
 
184
  86               	.LM1:
184
  86               	.LM1:
185
  87 0000 11B8      		out 33-0x20,__zero_reg__
185
  87 0000 11B8      		out 33-0x20,__zero_reg__
186
  87:I2CInterface.c ****     
186
  87:I2CInterface.c ****     
Line 236... Line 236...
236
 115               	.LM4:
236
 115               	.LM4:
237
 116 000a 8091 0000 		lds r24,status
237
 116 000a 8091 0000 		lds r24,status
238
 117 000e 8823      		tst r24
238
 117 000e 8823      		tst r24
239
 118 0010 E4F3      		brlt .L5
239
 118 0010 E4F3      		brlt .L5
240
 119               	.L9:
240
 119               	.L9:
241
GAS LISTING /tmp/ccQb65z2.s 			page 5
241
GAS LISTING /tmp/ccZHfAgR.s 			page 5
242
 
242
 
243
 
243
 
244
 110:I2CInterface.c **** 	while(TWCR & (1<<TWSTO));
244
 110:I2CInterface.c **** 	while(TWCR & (1<<TWSTO));
245
 120               		.stabn	68,0,110,.LM5-I2CInt_writeData
245
 120               		.stabn	68,0,110,.LM5-I2CInt_writeData
246
 121               	.LM5:
246
 121               	.LM5:
Line 296... Line 296...
296
 157               		.stabd	78,0,0
296
 157               		.stabd	78,0,0
297
 158               		.stabs	"I2CInt_readData:F(0,15)",36,0,138,I2CInt_readData
297
 158               		.stabs	"I2CInt_readData:F(0,15)",36,0,138,I2CInt_readData
298
 159               		.stabs	"address:P(0,11)",64,0,137,25
298
 159               		.stabs	"address:P(0,11)",64,0,137,25
299
 160               		.stabs	"data:P(0,16)",64,0,137,22
299
 160               		.stabs	"data:P(0,16)",64,0,137,22
300
 161               		.stabs	"bytes:P(0,11)",64,0,137,20
300
 161               		.stabs	"bytes:P(0,11)",64,0,137,20
301
GAS LISTING /tmp/ccQb65z2.s 			page 6
301
GAS LISTING /tmp/ccZHfAgR.s 			page 6
302
 
302
 
303
 
303
 
304
 162               	.global	I2CInt_readData
304
 162               	.global	I2CInt_readData
305
 163               		.type	I2CInt_readData, @function
305
 163               		.type	I2CInt_readData, @function
306
 164               	I2CInt_readData:
306
 164               	I2CInt_readData:
Line 356... Line 356...
356
 191               		.stabn	68,0,147,.LM19-I2CInt_readData
356
 191               		.stabn	68,0,147,.LM19-I2CInt_readData
357
 192               	.LM19:
357
 192               	.LM19:
358
 193 0060 1092 0000 		sts retry_cnt,__zero_reg__
358
 193 0060 1092 0000 		sts retry_cnt,__zero_reg__
359
 148:I2CInterface.c **** 	
359
 148:I2CInterface.c **** 	
360
 149:I2CInterface.c **** 	/* Generate start condition, the remainder of the transfer is interrupt driven and
360
 149:I2CInterface.c **** 	/* Generate start condition, the remainder of the transfer is interrupt driven and
361
GAS LISTING /tmp/ccQb65z2.s 			page 7
361
GAS LISTING /tmp/ccZHfAgR.s 			page 7
362
 
362
 
363
 
363
 
364
 150:I2CInterface.c **** 	   will be performed in the background */
364
 150:I2CInterface.c **** 	   will be performed in the background */
365
 151:I2CInterface.c **** 	TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN)|(1<<TWIE);
365
 151:I2CInterface.c **** 	TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN)|(1<<TWIE);
366
 194               		.stabn	68,0,151,.LM20-I2CInt_readData
366
 194               		.stabn	68,0,151,.LM20-I2CInt_readData
Line 416... Line 416...
416
 170:I2CInterface.c **** 		retVal = TRUE;
416
 170:I2CInterface.c **** 		retVal = TRUE;
417
 171:I2CInterface.c **** 	}
417
 171:I2CInterface.c **** 	}
418
 172:I2CInterface.c **** 	
418
 172:I2CInterface.c **** 	
419
 173:I2CInterface.c **** 	return(retVal);
419
 173:I2CInterface.c **** 	return(retVal);
420
 174:I2CInterface.c **** }
420
 174:I2CInterface.c **** }
421
GAS LISTING /tmp/ccQb65z2.s 			page 8
421
GAS LISTING /tmp/ccZHfAgR.s 			page 8
422
 
422
 
423
 
423
 
424
 226               		.stabn	68,0,174,.LM24-I2CInt_isI2cBusy
424
 226               		.stabn	68,0,174,.LM24-I2CInt_isI2cBusy
425
 227               	.LM24:
425
 227               	.LM24:
426
 228 007e 9927      		clr r25
426
 228 007e 9927      		clr r25
Line 476... Line 476...
476
 262 009a 9927      		clr r25
476
 262 009a 9927      		clr r25
477
 263 009c AA27      		clr r26
477
 263 009c AA27      		clr r26
478
 264 009e BB27      		clr r27
478
 264 009e BB27      		clr r27
479
 265 00a0 887F      		andi r24,lo8(248)
479
 265 00a0 887F      		andi r24,lo8(248)
480
 266 00a2 9070      		andi r25,hi8(248)
480
 266 00a2 9070      		andi r25,hi8(248)
481
GAS LISTING /tmp/ccQb65z2.s 			page 9
481
GAS LISTING /tmp/ccZHfAgR.s 			page 9
482
 
482
 
483
 
483
 
484
 267 00a4 A070      		andi r26,hlo8(248)
484
 267 00a4 A070      		andi r26,hlo8(248)
485
 268 00a6 B070      		andi r27,hhi8(248)
485
 268 00a6 B070      		andi r27,hhi8(248)
486
 269 00a8 FC01      		movw r30,r24
486
 269 00a8 FC01      		movw r30,r24
Line 536... Line 536...
536
 319 0040 00C0      		rjmp .L28
536
 319 0040 00C0      		rjmp .L28
537
 320 0042 00C0      		rjmp .L42
537
 320 0042 00C0      		rjmp .L42
538
 321 0044 00C0      		rjmp .L42
538
 321 0044 00C0      		rjmp .L42
539
 322 0046 00C0      		rjmp .L42
539
 322 0046 00C0      		rjmp .L42
540
 323 0048 00C0      		rjmp .L42
540
 323 0048 00C0      		rjmp .L42
541
GAS LISTING /tmp/ccQb65z2.s 			page 10
541
GAS LISTING /tmp/ccZHfAgR.s 			page 10
542
 
542
 
543
 
543
 
544
 324 004a 00C0      		rjmp .L42
544
 324 004a 00C0      		rjmp .L42
545
 325 004c 00C0      		rjmp .L42
545
 325 004c 00C0      		rjmp .L42
546
 326 004e 00C0      		rjmp .L42
546
 326 004e 00C0      		rjmp .L42
Line 596... Line 596...
596
 372 00ba 8091 0000 		lds r24,retry_cnt
596
 372 00ba 8091 0000 		lds r24,retry_cnt
597
 373 00be 8330      		cpi r24,lo8(3)
597
 373 00be 8330      		cpi r24,lo8(3)
598
 374 00c0 48F0      		brlo .L34
598
 374 00c0 48F0      		brlo .L34
599
 195:I2CInterface.c ****             {
599
 195:I2CInterface.c ****             {
600
 196:I2CInterface.c ****                 /* generate stop condition if we've reached our retry limit */
600
 196:I2CInterface.c ****                 /* generate stop condition if we've reached our retry limit */
601
GAS LISTING /tmp/ccQb65z2.s 			page 11
601
GAS LISTING /tmp/ccZHfAgR.s 			page 11
602
 
602
 
603
 
603
 
604
 197:I2CInterface.c ****                 TWCR |= (1<<TWINT)|(1<<TWSTO);					
604
 197:I2CInterface.c ****                 TWCR |= (1<<TWINT)|(1<<TWSTO);					
605
 375               		.stabn	68,0,197,.LM30-__vector_17
605
 375               		.stabn	68,0,197,.LM30-__vector_17
606
 376               	.LM30:
606
 376               	.LM30:
Line 656... Line 656...
656
 412 00fa 3196      		adiw r30,1
656
 412 00fa 3196      		adiw r30,1
657
 413 00fc F093 0000 		sts (twi_data)+1,r31
657
 413 00fc F093 0000 		sts (twi_data)+1,r31
658
 414 0100 E093 0000 		sts twi_data,r30
658
 414 0100 E093 0000 		sts twi_data,r30
659
 212:I2CInterface.c **** 
659
 212:I2CInterface.c **** 
660
 213:I2CInterface.c ****             /* clear the int to continue */
660
 213:I2CInterface.c ****             /* clear the int to continue */
661
GAS LISTING /tmp/ccQb65z2.s 			page 12
661
GAS LISTING /tmp/ccZHfAgR.s 			page 12
662
 
662
 
663
 
663
 
664
 214:I2CInterface.c ****             TWCR |= (1<<TWINT);						
664
 214:I2CInterface.c ****             TWCR |= (1<<TWINT);						
665
 415               		.stabn	68,0,214,.LM37-__vector_17
665
 415               		.stabn	68,0,214,.LM37-__vector_17
666
 416               	.LM37:
666
 416               	.LM37:
Line 716... Line 716...
716
 450 013c 3196      		adiw r30,1
716
 450 013c 3196      		adiw r30,1
717
 451 013e F093 0000 		sts (twi_data)+1,r31
717
 451 013e F093 0000 		sts (twi_data)+1,r31
718
 452 0142 E093 0000 		sts twi_data,r30
718
 452 0142 E093 0000 		sts twi_data,r30
719
 231:I2CInterface.c ****                 TWCR |= (1<<TWINT);								
719
 231:I2CInterface.c ****                 TWCR |= (1<<TWINT);								
720
 453               		.stabn	68,0,231,.LM43-__vector_17
720
 453               		.stabn	68,0,231,.LM43-__vector_17
721
GAS LISTING /tmp/ccQb65z2.s 			page 13
721
GAS LISTING /tmp/ccZHfAgR.s 			page 13
722
 
722
 
723
 
723
 
724
 454               	.LM43:
724
 454               	.LM43:
725
 455 0146 86B7      		in r24,86-0x20
725
 455 0146 86B7      		in r24,86-0x20
726
 456 0148 8068      		ori r24,lo8(-128)
726
 456 0148 8068      		ori r24,lo8(-128)
Line 776... Line 776...
776
 489 017c 8091 0000 		lds r24,twi_bytes
776
 489 017c 8091 0000 		lds r24,twi_bytes
777
 490 0180 8823      		tst r24
777
 490 0180 8823      		tst r24
778
 491 0182 21F0      		breq .L38
778
 491 0182 21F0      		breq .L38
779
 249:I2CInterface.c ****             {
779
 249:I2CInterface.c ****             {
780
 250:I2CInterface.c ****                 /* if there is more than one byte to read, acknowledge */
780
 250:I2CInterface.c ****                 /* if there is more than one byte to read, acknowledge */
781
GAS LISTING /tmp/ccQb65z2.s 			page 14
781
GAS LISTING /tmp/ccZHfAgR.s 			page 14
782
 
782
 
783
 
783
 
784
 251:I2CInterface.c ****                 TWCR |= (1<<TWEA)|(1<<TWINT);	
784
 251:I2CInterface.c ****                 TWCR |= (1<<TWEA)|(1<<TWINT);	
785
 492               		.stabn	68,0,251,.LM49-__vector_17
785
 492               		.stabn	68,0,251,.LM49-__vector_17
786
 493               	.LM49:
786
 493               	.LM49:
Line 836... Line 836...
836
 526               	.LM54:
836
 526               	.LM54:
837
 527 01bc 86B7      		in r24,86-0x20
837
 527 01bc 86B7      		in r24,86-0x20
838
 528 01be 806C      		ori r24,lo8(-64)
838
 528 01be 806C      		ori r24,lo8(-64)
839
 529 01c0 86BF      		out 86-0x20,r24
839
 529 01c0 86BF      		out 86-0x20,r24
840
 530 01c2 12C0      		rjmp .L42
840
 530 01c2 12C0      		rjmp .L42
841
GAS LISTING /tmp/ccQb65z2.s 			page 15
841
GAS LISTING /tmp/ccZHfAgR.s 			page 15
842
 
842
 
843
 
843
 
844
 531               	.L40:
844
 531               	.L40:
845
 269:I2CInterface.c ****             }
845
 269:I2CInterface.c ****             }
846
 270:I2CInterface.c ****             else
846
 270:I2CInterface.c ****             else
Line 896... Line 896...
896
 570               		.size	__vector_17, .-__vector_17
896
 570               		.size	__vector_17, .-__vector_17
897
 571               	.Lscope4:
897
 571               	.Lscope4:
898
 572               		.stabs	"",36,0,0,.Lscope4-__vector_17
898
 572               		.stabs	"",36,0,0,.Lscope4-__vector_17
899
 573               		.stabd	78,0,0
899
 573               		.stabd	78,0,0
900
 574               		.lcomm twi_address,1
900
 574               		.lcomm twi_address,1
901
GAS LISTING /tmp/ccQb65z2.s 			page 16
901
GAS LISTING /tmp/ccZHfAgR.s 			page 16
902
 
902
 
903
 
903
 
904
 575               		.lcomm twi_data,2
904
 575               		.lcomm twi_data,2
905
 576               		.lcomm twi_ddr,1
905
 576               		.lcomm twi_ddr,1
906
 577               		.lcomm twi_bytes,1
906
 577               		.lcomm twi_bytes,1
Line 913... Line 913...
913
 584               		.stabs	"status:S(0,17)",40,0,63,status
913
 584               		.stabs	"status:S(0,17)",40,0,63,status
914
 585               		.stabs	"retry_cnt:S(0,17)",40,0,64,retry_cnt
914
 585               		.stabs	"retry_cnt:S(0,17)",40,0,64,retry_cnt
915
 586               		.stabs	"",100,0,0,.Letext0
915
 586               		.stabs	"",100,0,0,.Letext0
916
 587               	.Letext0:
916
 587               	.Letext0:
917
 588               	/* File "I2CInterface.c": code  336 = 0x0150 ( 310), prologues  11, epilogues  15 */
917
 588               	/* File "I2CInterface.c": code  336 = 0x0150 ( 310), prologues  11, epilogues  15 */
918
GAS LISTING /tmp/ccQb65z2.s 			page 17
918
GAS LISTING /tmp/ccZHfAgR.s 			page 17
919
 
919
 
920
 
920
 
921
DEFINED SYMBOLS
921
DEFINED SYMBOLS
922
                            *ABS*:00000000 I2CInterface.c
922
                            *ABS*:00000000 I2CInterface.c
923
     /tmp/ccQb65z2.s:3      *ABS*:0000003f __SREG__
923
     /tmp/ccZHfAgR.s:3      *ABS*:0000003f __SREG__
924
     /tmp/ccQb65z2.s:4      *ABS*:0000003e __SP_H__
924
     /tmp/ccZHfAgR.s:4      *ABS*:0000003e __SP_H__
925
     /tmp/ccQb65z2.s:5      *ABS*:0000003d __SP_L__
925
     /tmp/ccZHfAgR.s:5      *ABS*:0000003d __SP_L__
926
     /tmp/ccQb65z2.s:6      *ABS*:00000000 __tmp_reg__
926
     /tmp/ccZHfAgR.s:6      *ABS*:00000000 __tmp_reg__
927
     /tmp/ccQb65z2.s:7      *ABS*:00000001 __zero_reg__
927
     /tmp/ccZHfAgR.s:7      *ABS*:00000001 __zero_reg__
928
     /tmp/ccQb65z2.s:79     .text:00000000 I2CInt_init
928
     /tmp/ccZHfAgR.s:79     .text:00000000 I2CInt_init
929
     /tmp/ccQb65z2.s:106    .text:00000008 I2CInt_writeData
929
     /tmp/ccZHfAgR.s:106    .text:00000008 I2CInt_writeData
930
     /tmp/ccQb65z2.s:577    .bss:00000005 status
930
     /tmp/ccZHfAgR.s:577    .bss:00000005 status
931
                             .bss:00000000 twi_address
931
                             .bss:00000000 twi_address
932
     /tmp/ccQb65z2.s:574    .bss:00000001 twi_data
932
     /tmp/ccZHfAgR.s:574    .bss:00000001 twi_data
933
     /tmp/ccQb65z2.s:576    .bss:00000004 twi_bytes
933
     /tmp/ccZHfAgR.s:576    .bss:00000004 twi_bytes
934
     /tmp/ccQb65z2.s:575    .bss:00000003 twi_ddr
934
     /tmp/ccZHfAgR.s:575    .bss:00000003 twi_ddr
935
     /tmp/ccQb65z2.s:578    .bss:00000006 retry_cnt
935
     /tmp/ccZHfAgR.s:578    .bss:00000006 retry_cnt
936
     /tmp/ccQb65z2.s:164    .text:00000040 I2CInt_readData
936
     /tmp/ccZHfAgR.s:164    .text:00000040 I2CInt_readData
937
     /tmp/ccQb65z2.s:214    .text:00000074 I2CInt_isI2cBusy
937
     /tmp/ccZHfAgR.s:214    .text:00000074 I2CInt_isI2cBusy
938
     /tmp/ccQb65z2.s:240    .text:00000082 __vector_17
938
     /tmp/ccZHfAgR.s:240    .text:00000082 __vector_17
939
 
939
 
940
UNDEFINED SYMBOLS
940
UNDEFINED SYMBOLS
941
__do_copy_data
941
__do_copy_data
942
__do_clear_bss
942
__do_clear_bss