📄 cc2420db_library.lss
字号:
23a: 3e b7 in r19, 0x3e ; 62
23c: 2e 5e subi r18, 0xEE ; 238
23e: 3f 4f sbci r19, 0xFF ; 255
240: 0f b6 in r0, 0x3f ; 63
242: f8 94 cli
244: 3e bf out 0x3e, r19 ; 62
246: 0f be out 0x3f, r0 ; 63
248: 2d bf out 0x3d, r18 ; 61
24a: 24 96 adiw r28, 0x04 ; 4
24c: 0f b6 in r0, 0x3f ; 63
24e: f8 94 cli
250: de bf out 0x3e, r29 ; 62
252: 0f be out 0x3f, r0 ; 63
254: cd bf out 0x3d, r28 ; 61
256: df 91 pop r29
258: cf 91 pop r28
25a: 1f 91 pop r17
25c: 0f 91 pop r16
25e: ff 90 pop r15
260: ef 90 pop r14
262: 08 95 ret
00000264 <read_cc_register>:
}
/*******************************************************************************
* Function: Read CC2420 register. *
*******************************************************************************/
int read_cc_register(char *command, char *response)
{
264: ef 92 push r14
266: ff 92 push r15
268: 0f 93 push r16
26a: 1f 93 push r17
26c: cf 93 push r28
26e: df 93 push r29
270: cd b7 in r28, 0x3d ; 61
272: de b7 in r29, 0x3e ; 62
274: 22 97 sbiw r28, 0x02 ; 2
276: 0f b6 in r0, 0x3f ; 63
278: f8 94 cli
27a: de bf out 0x3e, r29 ; 62
27c: 0f be out 0x3f, r0 ; 63
27e: cd bf out 0x3d, r28 ; 61
280: 8c 01 movw r16, r24
282: 7b 01 movw r14, r22
int status;
unsigned int address = 0, value = 0;
284: 19 82 std Y+1, r1 ; 0x01
286: 1a 82 std Y+2, r1 ; 0x02
/* parse command argument(s) */
status = sscanf(&command[1], "%2X", &address);
288: ce 01 movw r24, r28
28a: 01 96 adiw r24, 0x01 ; 1
28c: 9f 93 push r25
28e: 8f 93 push r24
290: 80 e0 ldi r24, 0x00 ; 0
292: 91 e0 ldi r25, 0x01 ; 1
294: 9f 93 push r25
296: 8f 93 push r24
298: 0f 5f subi r16, 0xFF ; 255
29a: 1f 4f sbci r17, 0xFF ; 255
29c: 1f 93 push r17
29e: 0f 93 push r16
2a0: 01 50 subi r16, 0x01 ; 1
2a2: 10 40 sbci r17, 0x00 ; 0
2a4: 0e 94 31 0a call 0x1462
/* execute command */
FASTSPI_GETREG(address, value);
2a8: c0 98 cbi 0x18, 0 ; 24
2aa: 89 81 ldd r24, Y+1 ; 0x01
2ac: 80 64 ori r24, 0x40 ; 64
2ae: 8f b9 out 0x0f, r24 ; 15
2b0: 2d b7 in r18, 0x3d ; 61
2b2: 3e b7 in r19, 0x3e ; 62
2b4: 2a 5f subi r18, 0xFA ; 250
2b6: 3f 4f sbci r19, 0xFF ; 255
2b8: 0f b6 in r0, 0x3f ; 63
2ba: f8 94 cli
2bc: 3e bf out 0x3e, r19 ; 62
2be: 0f be out 0x3f, r0 ; 63
2c0: 2d bf out 0x3d, r18 ; 61
2c2: 77 9b sbis 0x0e, 7 ; 14
2c4: fe cf rjmp .-4 ; 0x2c2
2c6: 1f b8 out 0x0f, r1 ; 15
2c8: 77 9b sbis 0x0e, 7 ; 14
2ca: fe cf rjmp .-4 ; 0x2c8
2cc: 8f b1 in r24, 0x0f ; 15
2ce: 99 27 eor r25, r25
2d0: 38 2f mov r19, r24
2d2: 22 27 eor r18, r18
2d4: 1f b8 out 0x0f, r1 ; 15
2d6: 77 9b sbis 0x0e, 7 ; 14
2d8: fe cf rjmp .-4 ; 0x2d6
2da: 8f b1 in r24, 0x0f ; 15
2dc: 99 27 eor r25, r25
2de: 28 2b or r18, r24
2e0: 39 2b or r19, r25
2e2: c0 9a sbi 0x18, 0 ; 24
/* generate command response */
status = sprintf(&response[0], ":%c%02X%04X\r\n",
2e4: 3f 93 push r19
2e6: 2f 93 push r18
2e8: 89 81 ldd r24, Y+1 ; 0x01
2ea: 9a 81 ldd r25, Y+2 ; 0x02
2ec: 9f 93 push r25
2ee: 8f 93 push r24
2f0: f8 01 movw r30, r16
2f2: 80 81 ld r24, Z
2f4: 99 27 eor r25, r25
2f6: 9f 93 push r25
2f8: 8f 93 push r24
2fa: 89 e1 ldi r24, 0x19 ; 25
2fc: 91 e0 ldi r25, 0x01 ; 1
2fe: 9f 93 push r25
300: 8f 93 push r24
302: ff 92 push r15
304: ef 92 push r14
306: 0e 94 00 0a call 0x1400
command[0], address, value);
/* return status */
return status;
30a: 2d b7 in r18, 0x3d ; 61
30c: 3e b7 in r19, 0x3e ; 62
30e: 26 5f subi r18, 0xF6 ; 246
310: 3f 4f sbci r19, 0xFF ; 255
312: 0f b6 in r0, 0x3f ; 63
314: f8 94 cli
316: 3e bf out 0x3e, r19 ; 62
318: 0f be out 0x3f, r0 ; 63
31a: 2d bf out 0x3d, r18 ; 61
31c: 22 96 adiw r28, 0x02 ; 2
31e: 0f b6 in r0, 0x3f ; 63
320: f8 94 cli
322: de bf out 0x3e, r29 ; 62
324: 0f be out 0x3f, r0 ; 63
326: cd bf out 0x3d, r28 ; 61
328: df 91 pop r29
32a: cf 91 pop r28
32c: 1f 91 pop r17
32e: 0f 91 pop r16
330: ff 90 pop r15
332: ef 90 pop r14
334: 08 95 ret
00000336 <write_cc_register>:
}
/*******************************************************************************
* Function: Write CC2420 register. *
*******************************************************************************/
int write_cc_register(char *command, char *response)
{
336: ef 92 push r14
338: ff 92 push r15
33a: 0f 93 push r16
33c: 1f 93 push r17
33e: cf 93 push r28
340: df 93 push r29
342: cd b7 in r28, 0x3d ; 61
344: de b7 in r29, 0x3e ; 62
346: 24 97 sbiw r28, 0x04 ; 4
348: 0f b6 in r0, 0x3f ; 63
34a: f8 94 cli
34c: de bf out 0x3e, r29 ; 62
34e: 0f be out 0x3f, r0 ; 63
350: cd bf out 0x3d, r28 ; 61
352: 8c 01 movw r16, r24
354: 7b 01 movw r14, r22
int status;
unsigned int address = 0, value = 0;
356: 1b 82 std Y+3, r1 ; 0x03
358: 1c 82 std Y+4, r1 ; 0x04
35a: 19 82 std Y+1, r1 ; 0x01
35c: 1a 82 std Y+2, r1 ; 0x02
/* parse command argument(s) */
status = sscanf(&command[1], "%2X%4X", &address, &value);
35e: ce 01 movw r24, r28
360: 01 96 adiw r24, 0x01 ; 1
362: 9f 93 push r25
364: 8f 93 push r24
366: ce 01 movw r24, r28
368: 03 96 adiw r24, 0x03 ; 3
36a: 9f 93 push r25
36c: 8f 93 push r24
36e: 87 e2 ldi r24, 0x27 ; 39
370: 91 e0 ldi r25, 0x01 ; 1
372: 9f 93 push r25
374: 8f 93 push r24
376: 0f 5f subi r16, 0xFF ; 255
378: 1f 4f sbci r17, 0xFF ; 255
37a: 1f 93 push r17
37c: 0f 93 push r16
37e: 01 50 subi r16, 0x01 ; 1
380: 10 40 sbci r17, 0x00 ; 0
382: 0e 94 31 0a call 0x1462
/* execute command */
FASTSPI_SETREG(address, value);
386: c0 98 cbi 0x18, 0 ; 24
388: 8b 81 ldd r24, Y+3 ; 0x03
38a: 8f b9 out 0x0f, r24 ; 15
38c: 2d b7 in r18, 0x3d ; 61
38e: 3e b7 in r19, 0x3e ; 62
390: 28 5f subi r18, 0xF8 ; 248
392: 3f 4f sbci r19, 0xFF ; 255
394: 0f b6 in r0, 0x3f ; 63
396: f8 94 cli
398: 3e bf out 0x3e, r19 ; 62
39a: 0f be out 0x3f, r0 ; 63
39c: 2d bf out 0x3d, r18 ; 61
39e: 77 9b sbis 0x0e, 7 ; 14
3a0: fe cf rjmp .-4 ; 0x39e
3a2: 89 81 ldd r24, Y+1 ; 0x01
3a4: 9a 81 ldd r25, Y+2 ; 0x02
3a6: 89 2f mov r24, r25
3a8: 99 27 eor r25, r25
3aa: 8f b9 out 0x0f, r24 ; 15
3ac: 77 9b sbis 0x0e, 7 ; 14
3ae: fe cf rjmp .-4 ; 0x3ac
3b0: 89 81 ldd r24, Y+1 ; 0x01
3b2: 8f b9 out 0x0f, r24 ; 15
3b4: 77 9b sbis 0x0e, 7 ; 14
3b6: fe cf rjmp .-4 ; 0x3b4
3b8: c0 9a sbi 0x18, 0 ; 24
/* generate command response */
status = sprintf(&response[0], ":%c%02X%04X\r\n",
3ba: 89 81 ldd r24, Y+1 ; 0x01
3bc: 9a 81 ldd r25, Y+2 ; 0x02
3be: 9f 93 push r25
3c0: 8f 93 push r24
3c2: 8b 81 ldd r24, Y+3 ; 0x03
3c4: 9c 81 ldd r25, Y+4 ; 0x04
3c6: 9f 93 push r25
3c8: 8f 93 push r24
3ca: f8 01 movw r30, r16
3cc: 80 81 ld r24, Z
3ce: 99 27 eor r25, r25
3d0: 9f 93 push r25
3d2: 8f 93 push r24
3d4: 89 e1 ldi r24, 0x19 ; 25
3d6: 91 e0 ldi r25, 0x01 ; 1
3d8: 9f 93 push r25
3da: 8f 93 push r24
3dc: ff 92 push r15
3de: ef 92 push r14
3e0: 0e 94 00 0a call 0x1400
command[0], address, value);
/* return status */
return status;
3e4: 2d b7 in r18, 0x3d ; 61
3e6: 3e b7 in r19, 0x3e ; 62
3e8: 26 5f subi r18, 0xF6 ; 246
3ea: 3f 4f sbci r19, 0xFF ; 255
3ec: 0f b6 in r0, 0x3f ; 63
3ee: f8 94 cli
3f0: 3e bf out 0x3e, r19 ; 62
3f2: 0f be out 0x3f, r0 ; 63
3f4: 2d bf out 0x3d, r18 ; 61
3f6: 24 96 adiw r28, 0x04 ; 4
3f8: 0f b6 in r0, 0x3f ; 63
3fa: f8 94 cli
3fc: de bf out 0x3e, r29 ; 62
3fe: 0f be out 0x3f, r0 ; 63
400: cd bf out 0x3d, r28 ; 61
402: df 91 pop r29
404: cf 91 pop r28
406: 1f 91 pop r17
408: 0f 91 pop r16
40a: ff 90 pop r15
40c: ef 90 pop r14
40e: 08 95 ret
00000410 <init_cc_transceiver>:
}
/*******************************************************************************
* Function: Set ATmega128 port direction. *
*******************************************************************************/
/*******************************************************************************
* Function: Read ATmega128 port. *
*******************************************************************************/
/*******************************************************************************
* Function: Write ATmega128 port. *
*******************************************************************************/
/*******************************************************************************
* Function: Initialize CC2420 transceiver. *
*******************************************************************************/
int init_cc_transceiver(char *command, char *response)
{
410: ef 92 push r14
412: ff 92 push r15
414: 0f 93 push r16
416: 1f 93 push r17
418: cf 93 push r28
41a: df 93 push r29
41c: cd b7 in r28, 0x3d ; 61
41e: de b7 in r29, 0x3e ; 62
420: 26 97 sbiw r28, 0x06 ; 6
422: 0f b6 in r0, 0x3f ; 63
424: f8 94 cli
426: de bf out 0x3e, r29 ; 62
428: 0f be out 0x3f, r0 ; 63
42a: cd bf out 0x3d, r28 ; 61
42c: 8c 01 movw r16, r24
42e: 7b 01 movw r14, r22
int status;
unsigned int channel = 0, panid = 0, myaddress = 0;
430: 80 e0 ldi r24, 0x00 ; 0
432: 90 e0 ldi r25, 0x00 ; 0
434: 8d 83 std Y+5, r24 ; 0x05
436: 9e 83 std Y+6, r25 ; 0x06
438: 8b 83 std Y+3, r24 ; 0x03
43a: 9c 83 std Y+4, r25 ; 0x04
43c: 89 83 std Y+1, r24 ; 0x01
43e: 9a 83 std Y+2, r25 ; 0x02
/* parse command argument(s) */
status = sscanf(&command[1], "%2X%4X%4X", &channel, &panid, &myaddress);
440: ce 01 movw r24, r28
442: 01 96 adiw r24, 0x01 ; 1
444: 9f 93 push r25
446: 8f 93 push r24
448: ce 01 movw r24, r28
44a: 03 96 adiw r24, 0x03 ; 3
44c: 9f 93 push r25
44e: 8f 93 push r24
450: ce 01 movw r24, r28
452: 05 96 adiw r24, 0x05 ; 5
454: 9f 93 push r25
456: 8f 93 push r24
458: 8e e2 ldi r24, 0x2E ; 46
45a: 91 e0 ldi r25, 0x01 ; 1
45c: 9f 93 push r25
45e: 8f 93 push r24
460: 0f 5f subi r16, 0xFF ; 255
462: 1f 4f sbci r17, 0xFF ; 255
464: 1f 93 push r17
466: 0f 93 push r16
468: 0e 94 31 0a call 0x1462
/* execute command */
basicRfInit(&rfRxInfo, channel, panid, myaddress);
46c: 29 81 ldd r18, Y+1 ; 0x01
46e: 3a 81 ldd r19, Y+2 ; 0x02
470: 4b 81 ldd r20, Y+3 ; 0x03
472: 5c 81 ldd r21, Y+4 ; 0x04
474: 6d 81 ldd r22, Y+5 ; 0x05
476: 83 eb ldi r24, 0xB3 ; 179
478: 91 e0 ldi r25, 0x01 ; 1
47a: 0e 94 b0 06 call 0xd60
rfRxInfo.pPayload = pRxBuffer;
47e: 8d eb ldi r24, 0xBD ; 189
480: 91 e0 ldi r25, 0x01 ; 1
482: 90 93 ba 01 sts 0x01BA, r25
486: 80 93 b9 01 sts 0x01B9, r24
rfTxInfo.pPayload = pTxBuffer;
48a: 89 e3 ldi r24, 0x39 ; 57
48c: 92 e0 ldi r25, 0x02 ; 2
48e: 90 93 37 02 sts 0x0237, r25
492: 80 93 36 02 sts 0x0236, r24
basicRfReceiveOn();
496: 0e 94 7a 08 call 0x10f4
/* generate command response */
status = sprintf(&response[0], ":%c%02X%04X%04X\r\n",
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -