📄 test.lss
字号:
614: 88 b3 in r24, 0x18 ; 24
616: 87 7e andi r24, 0xE7 ; 231
PORTB = tmpChar | tmpPB;
618: 8c 2b or r24, r28
61a: 88 bb out 0x18, r24 ; 24
61c: cf 91 pop r28
61e: 1f 91 pop r17
620: 08 95 ret
00000622 <setChargeReg>:
}
// 充电寄存器设置
void setChargeReg(unsigned char chargeMode)
{
622: 1f 93 push r17
624: 18 2f mov r17, r24
setChipReg(0x8E,0x00); // 可写
626: 60 e0 ldi r22, 0x00 ; 0
628: 8e e8 ldi r24, 0x8E ; 142
62a: 0e 94 c1 02 call 0x582
setChipReg(0x90,chargeMode);
62e: 61 2f mov r22, r17
630: 80 e9 ldi r24, 0x90 ; 144
632: 0e 94 c1 02 call 0x582
setChipReg(0x8E,0x80);//不可写,即写保护打开
636: 60 e8 ldi r22, 0x80 ; 128
638: 8e e8 ldi r24, 0x8E ; 142
63a: 0e 94 c1 02 call 0x582
63e: 1f 91 pop r17
640: 08 95 ret
00000642 <burstModeTimeWrite>:
}
/* burstMode 写 */
void burstModeTimeWrite(unsigned char *pClock)
{
642: ef 92 push r14
644: ff 92 push r15
646: 1f 93 push r17
648: cf 93 push r28
64a: 7c 01 movw r14, r24
unsigned char i;
unsigned char tmpPB = PORTB & 0x38;//取PB3,PB4,PB5,在操作完可恢复
64c: 18 b3 in r17, 0x18 ; 24
64e: 18 73 andi r17, 0x38 ; 56
DDRB |= (1<<DDB5);//PB5输出0,即处于复位状态
650: bd 9a sbi 0x17, 5 ; 23
PORTB &= ~(1<<PORTB5);
652: c5 98 cbi 0x18, 5 ; 24
setChipReg(0x8E,0x00);//将写保护关了,可写
654: 60 e0 ldi r22, 0x00 ; 0
656: 8e e8 ldi r24, 0x8E ; 142
658: 0e 94 c1 02 call 0x582
CLR_TIMER_SCLK;
65c: c3 98 cbi 0x18, 3 ; 24
asm volatile ("nop \n\t" ::);
65e: 00 00 nop
SET_TIMER_REST;
660: c5 9a sbi 0x18, 5 ; 24
asm volatile ("nop \n\t" ::);
662: 00 00 nop
writeChar(0xBE);//设置为BURSTMODE,这种模式连续读/写8个时钟寄存器
664: 8e eb ldi r24, 0xBE ; 190
666: 0e 94 a0 02 call 0x540
for(i = 8;i > 0;i--)//不需要写入地址,固定是对那8个地址的操作,只需写入数据
66a: c8 e0 ldi r28, 0x08 ; 8
{
writeChar(*pClock);
66c: f7 01 movw r30, r14
66e: 81 91 ld r24, Z+
670: 7f 01 movw r14, r30
672: 0e 94 a0 02 call 0x540
676: c1 50 subi r28, 0x01 ; 1
678: c9 f7 brne .-14 ; 0x66c
pClock++;
}
CLR_TIMER_SCLK;
67a: c3 98 cbi 0x18, 3 ; 24
asm volatile ("nop \n\t" ::);
67c: 00 00 nop
CLR_TIMER_REST;
67e: c5 98 cbi 0x18, 5 ; 24
asm volatile ("nop \n\t" ::);
680: 00 00 nop
setChipReg(0x8E,0x80);//写保护打开,不可写
682: 60 e8 ldi r22, 0x80 ; 128
684: 8e e8 ldi r24, 0x8E ; 142
686: 0e 94 c1 02 call 0x582
i = PORTB & 0xC7;//还原PORTB的值
68a: 88 b3 in r24, 0x18 ; 24
68c: 87 7c andi r24, 0xC7 ; 199
PORTB = tmpPB | i;
68e: 18 2b or r17, r24
690: 18 bb out 0x18, r17 ; 24
DDRB &= ~(1<<DDB5);//PB5输入上拉,不处于复位状态
692: bd 98 cbi 0x17, 5 ; 23
PORTB |= (1<<PORTB5);
694: c5 9a sbi 0x18, 5 ; 24
696: cf 91 pop r28
698: 1f 91 pop r17
69a: ff 90 pop r15
69c: ef 90 pop r14
69e: 08 95 ret
000006a0 <burstModeTimeRead>:
}
/* burstMode 读 */
void burstModeTimeRead(unsigned char *pClock)
{
6a0: ef 92 push r14
6a2: ff 92 push r15
6a4: 1f 93 push r17
6a6: cf 93 push r28
6a8: 7c 01 movw r14, r24
unsigned char i;
unsigned char tmpPB = PORTB & 0x38;
6aa: 18 b3 in r17, 0x18 ; 24
6ac: 18 73 andi r17, 0x38 ; 56
DDRB |= (1<<DDB5);
6ae: bd 9a sbi 0x17, 5 ; 23
PORTB &= ~(1<<PORTB5);
6b0: c5 98 cbi 0x18, 5 ; 24
setChipReg(0x8E,0x00);
6b2: 60 e0 ldi r22, 0x00 ; 0
6b4: 8e e8 ldi r24, 0x8E ; 142
6b6: 0e 94 c1 02 call 0x582
CLR_TIMER_SCLK;
6ba: c3 98 cbi 0x18, 3 ; 24
asm volatile ("nop \n\t" ::);
6bc: 00 00 nop
SET_TIMER_REST;
6be: c5 9a sbi 0x18, 5 ; 24
asm volatile ("nop \n\t" ::);
6c0: 00 00 nop
writeChar(0xBF);
6c2: 8f eb ldi r24, 0xBF ; 191
6c4: 0e 94 a0 02 call 0x540
for(i = 8;i > 0;i--)
6c8: c8 e0 ldi r28, 0x08 ; 8
{
*pClock = readChar();
6ca: 0e 94 ae 02 call 0x55c
6ce: f7 01 movw r30, r14
6d0: 81 93 st Z+, r24
6d2: 7f 01 movw r14, r30
6d4: c1 50 subi r28, 0x01 ; 1
6d6: c9 f7 brne .-14 ; 0x6ca
pClock++;
}
CLR_TIMER_SCLK;
6d8: c3 98 cbi 0x18, 3 ; 24
asm volatile ("nop \n\t" ::);
6da: 00 00 nop
CLR_TIMER_REST;
6dc: c5 98 cbi 0x18, 5 ; 24
asm volatile ("nop \n\t" ::);
6de: 00 00 nop
setChipReg(0x8E,0x80);
6e0: 60 e8 ldi r22, 0x80 ; 128
6e2: 8e e8 ldi r24, 0x8E ; 142
6e4: 0e 94 c1 02 call 0x582
i = PORTB & 0xC7;
6e8: 88 b3 in r24, 0x18 ; 24
6ea: 87 7c andi r24, 0xC7 ; 199
PORTB = tmpPB | i;
6ec: 18 2b or r17, r24
6ee: 18 bb out 0x18, r17 ; 24
DDRB &= ~(1<<DDB5);
6f0: bd 98 cbi 0x17, 5 ; 23
PORTB |= (1<<PORTB5);
6f2: c5 9a sbi 0x18, 5 ; 24
6f4: cf 91 pop r28
6f6: 1f 91 pop r17
6f8: ff 90 pop r15
6fa: ef 90 pop r14
6fc: 08 95 ret
000006fe <OSTaskStkInit>:
**********************************************************************************************************
*/
OS_STK *OSTaskStkInit (void (*task)(void *pd), void *pdata, OS_STK *ptos, INT16U opt)
{
6fe: fa 01 movw r30, r20
INT8U *stk;
INT16U tmp;
opt = opt; /* 'opt' is not used, prevent warning */
stk = (INT8U *)ptos; /* AVR return stack ("hardware stack") */
tmp = (INT16U)task;
/* "push" initial register values onto the stack */
*stk-- = (INT8U)tmp; /* Put task start address on top of stack */
700: 80 83 st Z, r24
702: 31 97 sbiw r30, 0x01 ; 1
*stk-- = (INT8U)(tmp >> 8);
704: 89 2f mov r24, r25
706: 99 27 eor r25, r25
708: 80 83 st Z, r24
*stk-- = (INT8U)0x00; /* R0 = 0x00 */
70a: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R1 = 0x00 */
70c: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R2 = 0x00 */
70e: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R3 = 0x00 */
710: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R4 = 0x00 */
712: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R5 = 0x00 */
714: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R6 = 0x00 */
716: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R7 = 0x00 */
718: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R8 = 0x00 */
71a: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R9 = 0x00 */
71c: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R10 = 0x00 */
71e: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R11 = 0x00 */
720: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R12 = 0x00 */
722: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R13 = 0x00 */
724: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R14 = 0x00 */
726: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R15 = 0x00 */
728: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R16 = 0x00 */
72a: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R17 = 0x00 */
72c: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R18 = 0x00 */
72e: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R19 = 0x00 */
730: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R20 = 0x00 */
732: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R21 = 0x00 */
734: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R22 = 0x00 */
736: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R23 = 0x00 */
738: 12 92 st -Z, r1
tmp = (INT16U)pdata;
*stk-- = (INT8U)tmp; /* Simulate call to function with argument */
73a: 62 93 st -Z, r22
*stk-- = (INT8U)(tmp >> 8); /* R24, R25 contains argument pointer pdata */
73c: 87 2f mov r24, r23
73e: 99 27 eor r25, r25
740: 82 93 st -Z, r24
*stk-- = (INT8U)0x00; /* R26 = 0x00 */
742: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R27 = 0x00 */
744: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R28 = 0x00 */
746: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R29 = 0x00 */
748: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R30 = 0x00 */
74a: 12 92 st -Z, r1
*stk-- = (INT8U)0x00; /* R31 = 0x00 */
74c: 12 92 st -Z, r1
#ifdef RAMPZ
*stk-- = (INT8U)0x00; /* RAMPZ = 0x00 */
#endif
*stk-- = (INT8U)0x80; /* SREG = Interrupts enabled */
74e: 80 e8 ldi r24, 0x80 ; 128
750: 82 93 st -Z, r24
return ((OS_STK *)stk);
}
752: cf 01 movw r24, r30
754: 01 97 sbiw r24, 0x01 ; 1
756: 08 95 ret
00000758 <OSTaskCreateHook>:
/*$PAGE*/
/*
*********************************************************************************************************
* TASK CREATION HOOK
*
* Description: This function is called when a task is created.
*
* Arguments : ptcb is a pointer to the task control block of the task being created.
*
* Note(s) : 1) Interrupts are disabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0
void OSTaskCreateHook (OS_TCB *ptcb)
{
758: 08 95 ret
0000075a <OSTaskDelHook>:
ptcb = ptcb; /* Prevent compiler warning */
}
#endif
/*
*********************************************************************************************************
* TASK DELETION HOOK
*
* Description: This function is called when a task is deleted.
*
* Arguments : ptcb is a pointer to the task control block of the task being deleted.
*
* Note(s) : 1) Interrupts are disabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0
void OSTaskDelHook (OS_TCB *ptcb)
{
75a: 08 95 ret
0000075c <OSTaskSwHook>:
ptcb = ptcb; /* Prevent compiler warning */
}
#endif
/*
*********************************************************************************************************
* TASK SWITCH HOOK
*
* Description: This function is called when a task switch is performed. This allows you to perform other
* operations during a context switch.
*
* Arguments : none
*
* Note(s) : 1) Interrupts are disabled during this call.
* 2) It is assumed that the global pointer 'OSTCBHighRdy' points to the TCB of the task that
* will be 'switched in' (i.e. the highest priority task) and, 'OSTCBCur' points to the
* task being switched out (i.e. the preempted task).
*********************************************************************************************************
*/
#if (OS_CPU_HOOKS_EN > 0) && (OS_TASK_SW_HOOK_EN > 0)
void OSTaskSwHook (void)
{
75c: 08 95 ret
0000075e <OSTaskStatHook>:
}
#endif
/*
*********************************************************************************************************
* STATISTIC TASK HOOK
*
* Description: This function is called every second by uC/OS-II's statistics task. This allows your
* application to add functionality to the statistics task.
*
* Arguments : none
*********************************************************************************************************
*/
void OSTaskStatHook (void)
{
75e: 08 95 ret
00000760 <OSTimeTickHook>:
}
/*
*********************************************************************************************************
* TICK HOOK
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -