ARM GAS  /tmp/ccZ44inw.s 			page 1


   1              		.cpu cortex-m0
   2              		.arch armv6s-m
   3              		.fpu softvfp
   4              		.eabi_attribute 23, 1
   5              		.eabi_attribute 24, 1
   6              		.eabi_attribute 25, 1
   7              		.eabi_attribute 26, 1
   8              		.eabi_attribute 30, 2
   9              		.eabi_attribute 34, 0
  10              		.eabi_attribute 18, 4
  11              		.file	"task.c"
  12              		.text
  13              	.Ltext0:
  14              		.cfi_sections	.debug_frame
  15              		.file 1 "Component/task/task.c"
  16              		.section	.text.task_init,"ax",%progbits
  17              		.align	1
  18              		.p2align 2,,3
  19              		.global	task_init
  20              		.syntax unified
  21              		.code	16
  22              		.thumb_func
  24              	task_init:
  25              	.LVL0:
  26              	.LFB0:
   1:Component/task/task.c **** 
   2:Component/task/task.c **** #include <task.h>
   3:Component/task/task.c **** #include <string.h>
   4:Component/task/task.c **** #include <task_define.h>
   5:Component/task/task.c **** 
   6:Component/task/task.c **** /**
   7:Component/task/task.c ****  * @brief 初始化任务
   8:Component/task/task.c ****  *
   9:Component/task/task.c ****  * 该函数用于初始化任务相关的设置。
  10:Component/task/task.c ****  * 首先，使用 memset 函数将 task 结构体清零。
  11:Component/task/task.c ****  * 然后，调用 systick_config 函数配置系统时钟。
  12:Component/task/task.c ****  */
  13:Component/task/task.c **** void task_init(task_t self)
  14:Component/task/task.c **** {
  27              		.loc 1 14 1 view -0
  28              		.cfi_startproc
  29              		@ args = 0, pretend = 0, frame = 0
  30              		@ frame_needed = 0, uses_anonymous_args = 0
  15:Component/task/task.c ****     TASK_ASSERT(self);
  31              		.loc 1 15 22 view .LVU1
  16:Component/task/task.c ****     memset(self, 0, sizeof(struct task));
  32              		.loc 1 16 5 view .LVU2
  14:Component/task/task.c ****     TASK_ASSERT(self);
  33              		.loc 1 14 1 is_stmt 0 view .LVU3
  34 0000 10B5     		push	{r4, lr}
  35              	.LCFI0:
  36              		.cfi_def_cfa_offset 8
  37              		.cfi_offset 4, -8
  38              		.cfi_offset 14, -4
  39              		.loc 1 16 5 view .LVU4
  40 0002 3022     		movs	r2, #48
  17:Component/task/task.c **** }
ARM GAS  /tmp/ccZ44inw.s 			page 2


  41              		.loc 1 17 1 view .LVU5
  42              		@ sp needed
  16:Component/task/task.c ****     memset(self, 0, sizeof(struct task));
  43              		.loc 1 16 5 view .LVU6
  44 0004 0021     		movs	r1, #0
  45 0006 FFF7FEFF 		bl	memset
  46              	.LVL1:
  47              		.loc 1 17 1 view .LVU7
  48 000a 10BD     		pop	{r4, pc}
  49              		.cfi_endproc
  50              	.LFE0:
  52              		.section	.text.task_on_loop,"ax",%progbits
  53              		.align	1
  54              		.p2align 2,,3
  55              		.global	task_on_loop
  56              		.syntax unified
  57              		.code	16
  58              		.thumb_func
  60              	task_on_loop:
  61              	.LVL2:
  62              	.LFB1:
  18:Component/task/task.c **** 
  19:Component/task/task.c **** /**
  20:Component/task/task.c ****  * @brief 循环执行任务处理函数
  21:Component/task/task.c ****  *
  22:Component/task/task.c ****  * 此函数在任务循环中调用，用于处理周期性任务。
  23:Component/task/task.c ****  *
  24:Component/task/task.c ****  */
  25:Component/task/task.c **** void task_on_loop(task_t self)
  26:Component/task/task.c **** {
  63              		.loc 1 26 1 is_stmt 1 view -0
  64              		.cfi_startproc
  65              		@ args = 0, pretend = 0, frame = 0
  66              		@ frame_needed = 0, uses_anonymous_args = 0
  27:Component/task/task.c ****     TASK_ASSERT(self);
  67              		.loc 1 27 22 view .LVU9
  28:Component/task/task.c **** 
  29:Component/task/task.c **** #if ONCE_TASK_MAX_NUM > 0
  30:Component/task/task.c ****     uint8_t index;
  31:Component/task/task.c ****     for (self->index = 0; index < ONCE_TASK_MAX_NUM; index++)
  32:Component/task/task.c ****     {
  33:Component/task/task.c ****         if (self->once[index].flag)
  34:Component/task/task.c ****         {
  35:Component/task/task.c ****             if (self->once[index].hook)
  36:Component/task/task.c ****             {
  37:Component/task/task.c ****                 self->once[index].hook();
  38:Component/task/task.c ****             }
  39:Component/task/task.c ****             self->once[index].flag = false;
  40:Component/task/task.c ****         }
  41:Component/task/task.c ****     }
  42:Component/task/task.c **** #endif
  43:Component/task/task.c **** 
  44:Component/task/task.c **** #if CYCLE_TASK_MAX_NUM > 0
  45:Component/task/task.c ****     if (!self->update)
  68              		.loc 1 45 5 view .LVU10
  69              		.loc 1 45 14 is_stmt 0 view .LVU11
  70 0000 0378     		ldrb	r3, [r0]
ARM GAS  /tmp/ccZ44inw.s 			page 3


  26:Component/task/task.c ****     TASK_ASSERT(self);
  71              		.loc 1 26 1 view .LVU12
  72 0002 10B5     		push	{r4, lr}
  73              	.LCFI1:
  74              		.cfi_def_cfa_offset 8
  75              		.cfi_offset 4, -8
  76              		.cfi_offset 14, -4
  26:Component/task/task.c ****     TASK_ASSERT(self);
  77              		.loc 1 26 1 view .LVU13
  78 0004 0400     		movs	r4, r0
  79              		.loc 1 45 8 view .LVU14
  80 0006 002B     		cmp	r3, #0
  81 0008 3FD0     		beq	.L3
  46:Component/task/task.c ****     {
  47:Component/task/task.c ****         return;
  48:Component/task/task.c ****     }
  49:Component/task/task.c **** 
  50:Component/task/task.c ****     self->update = false;
  82              		.loc 1 50 5 is_stmt 1 view .LVU15
  83              		.loc 1 50 18 is_stmt 0 view .LVU16
  84 000a 0023     		movs	r3, #0
  85 000c 0370     		strb	r3, [r0]
  51:Component/task/task.c ****     for (self->index = 0; self->index < CYCLE_TASK_MAX_NUM; self->index++)
  86              		.loc 1 51 5 is_stmt 1 view .LVU17
  87              		.loc 1 51 22 is_stmt 0 view .LVU18
  88 000e 8360     		str	r3, [r0, #8]
  89              		.loc 1 51 39 is_stmt 1 discriminator 1 view .LVU19
  90              		.loc 1 51 31 is_stmt 0 discriminator 1 view .LVU20
  91 0010 8368     		ldr	r3, [r0, #8]
  92              		.loc 1 51 39 discriminator 1 view .LVU21
  93 0012 022B     		cmp	r3, #2
  94 0014 0FD9     		bls	.L7
  95 0016 38E0     		b	.L3
  96              	.LVL3:
  97              	.L15:
  52:Component/task/task.c ****     {
  53:Component/task/task.c ****         if (!self->cycle[self->index].hook)
  54:Component/task/task.c ****         {
  55:Component/task/task.c ****             continue;
  56:Component/task/task.c ****         }
  57:Component/task/task.c ****         if (self->cycle[self->index].count > self->tick)
  58:Component/task/task.c ****         {
  59:Component/task/task.c ****             self->cycle[self->index].count -= self->tick;
  98              		.loc 1 59 13 is_stmt 1 view .LVU22
  99              		.loc 1 59 51 is_stmt 0 view .LVU23
 100 0018 6168     		ldr	r1, [r4, #4]
 101              		.loc 1 59 29 view .LVU24
 102 001a A268     		ldr	r2, [r4, #8]
 103              		.loc 1 59 37 view .LVU25
 104 001c 5300     		lsls	r3, r2, #1
 105 001e 9B18     		adds	r3, r3, r2
 106 0020 9B00     		lsls	r3, r3, #2
 107 0022 E318     		adds	r3, r4, r3
 108 0024 DA68     		ldr	r2, [r3, #12]
 109              		.loc 1 59 44 view .LVU26
 110 0026 521A     		subs	r2, r2, r1
 111 0028 DA60     		str	r2, [r3, #12]
ARM GAS  /tmp/ccZ44inw.s 			page 4


 112              	.L5:
  51:Component/task/task.c ****     for (self->index = 0; self->index < CYCLE_TASK_MAX_NUM; self->index++)
 113              		.loc 1 51 72 is_stmt 1 discriminator 2 view .LVU27
  51:Component/task/task.c ****     for (self->index = 0; self->index < CYCLE_TASK_MAX_NUM; self->index++)
 114              		.loc 1 51 65 is_stmt 0 discriminator 2 view .LVU28
 115 002a A368     		ldr	r3, [r4, #8]
  51:Component/task/task.c ****     for (self->index = 0; self->index < CYCLE_TASK_MAX_NUM; self->index++)
 116              		.loc 1 51 72 discriminator 2 view .LVU29
 117 002c 0133     		adds	r3, r3, #1
 118 002e A360     		str	r3, [r4, #8]
  51:Component/task/task.c ****     for (self->index = 0; self->index < CYCLE_TASK_MAX_NUM; self->index++)
 119              		.loc 1 51 39 is_stmt 1 discriminator 1 view .LVU30
  51:Component/task/task.c ****     for (self->index = 0; self->index < CYCLE_TASK_MAX_NUM; self->index++)
 120              		.loc 1 51 31 is_stmt 0 discriminator 1 view .LVU31
 121 0030 A368     		ldr	r3, [r4, #8]
  51:Component/task/task.c ****     for (self->index = 0; self->index < CYCLE_TASK_MAX_NUM; self->index++)
 122              		.loc 1 51 39 discriminator 1 view .LVU32
 123 0032 022B     		cmp	r3, #2
 124 0034 29D8     		bhi	.L3
 125              	.L7:
  53:Component/task/task.c ****         {
 126              		.loc 1 53 9 is_stmt 1 view .LVU33
  53:Component/task/task.c ****         {
 127              		.loc 1 53 30 is_stmt 0 view .LVU34
 128 0036 A268     		ldr	r2, [r4, #8]
  53:Component/task/task.c ****         {
 129              		.loc 1 53 38 view .LVU35
 130 0038 5300     		lsls	r3, r2, #1
 131 003a 9B18     		adds	r3, r3, r2
 132 003c 9B00     		lsls	r3, r3, #2
 133 003e E318     		adds	r3, r4, r3
 134 0040 5B69     		ldr	r3, [r3, #20]
  53:Component/task/task.c ****         {
 135              		.loc 1 53 12 view .LVU36
 136 0042 002B     		cmp	r3, #0
 137 0044 F1D0     		beq	.L5
  57:Component/task/task.c ****         {
 138              		.loc 1 57 9 is_stmt 1 view .LVU37
  57:Component/task/task.c ****         {
 139              		.loc 1 57 29 is_stmt 0 view .LVU38
 140 0046 A268     		ldr	r2, [r4, #8]
  57:Component/task/task.c ****         {
 141              		.loc 1 57 37 view .LVU39
 142 0048 5300     		lsls	r3, r2, #1
 143 004a 9B18     		adds	r3, r3, r2
 144 004c 9B00     		lsls	r3, r3, #2
 145 004e E318     		adds	r3, r4, r3
 146 0050 DA68     		ldr	r2, [r3, #12]
  57:Component/task/task.c ****         {
 147              		.loc 1 57 50 view .LVU40
 148 0052 6368     		ldr	r3, [r4, #4]
  57:Component/task/task.c ****         {
 149              		.loc 1 57 12 view .LVU41
 150 0054 9A42     		cmp	r2, r3
 151 0056 DFD8     		bhi	.L15
  60:Component/task/task.c ****         }
  61:Component/task/task.c ****         else
ARM GAS  /tmp/ccZ44inw.s 			page 5


  62:Component/task/task.c ****         {
  63:Component/task/task.c ****             self->cycle[self->index].count = self->cycle[self->index].cycle;
 152              		.loc 1 63 13 is_stmt 1 view .LVU42
 153              		.loc 1 63 62 is_stmt 0 view .LVU43
 154 0058 A168     		ldr	r1, [r4, #8]
 155              		.loc 1 63 29 view .LVU44
 156 005a A268     		ldr	r2, [r4, #8]
 157              		.loc 1 63 70 view .LVU45
 158 005c 4B00     		lsls	r3, r1, #1
 159 005e 5B18     		adds	r3, r3, r1
 160 0060 9B00     		lsls	r3, r3, #2
 161 0062 E318     		adds	r3, r4, r3
 162 0064 1969     		ldr	r1, [r3, #16]
 163              		.loc 1 63 44 view .LVU46
 164 0066 5300     		lsls	r3, r2, #1
 165 0068 9B18     		adds	r3, r3, r2
 166 006a 9B00     		lsls	r3, r3, #2
 167 006c E318     		adds	r3, r4, r3
 168 006e D960     		str	r1, [r3, #12]
  64:Component/task/task.c ****             self->cycle[self->index].hook();
 169              		.loc 1 64 13 is_stmt 1 view .LVU47
 170              		.loc 1 64 29 is_stmt 0 view .LVU48
 171 0070 A268     		ldr	r2, [r4, #8]
 172              		.loc 1 64 37 view .LVU49
 173 0072 5300     		lsls	r3, r2, #1
 174 0074 9B18     		adds	r3, r3, r2
 175 0076 9B00     		lsls	r3, r3, #2
 176 0078 E318     		adds	r3, r4, r3
 177 007a 5B69     		ldr	r3, [r3, #20]
 178              		.loc 1 64 13 view .LVU50
 179 007c 9847     		blx	r3
 180              	.LVL4:
  51:Component/task/task.c ****     {
 181              		.loc 1 51 72 is_stmt 1 discriminator 2 view .LVU51
  51:Component/task/task.c ****     {
 182              		.loc 1 51 65 is_stmt 0 discriminator 2 view .LVU52
 183 007e A368     		ldr	r3, [r4, #8]
  51:Component/task/task.c ****     {
 184              		.loc 1 51 72 discriminator 2 view .LVU53
 185 0080 0133     		adds	r3, r3, #1
 186 0082 A360     		str	r3, [r4, #8]
  51:Component/task/task.c ****     {
 187              		.loc 1 51 39 is_stmt 1 discriminator 1 view .LVU54
  51:Component/task/task.c ****     {
 188              		.loc 1 51 31 is_stmt 0 discriminator 1 view .LVU55
 189 0084 A368     		ldr	r3, [r4, #8]
  51:Component/task/task.c ****     {
 190              		.loc 1 51 39 discriminator 1 view .LVU56
 191 0086 022B     		cmp	r3, #2
 192 0088 D5D9     		bls	.L7
 193              	.L3:
  65:Component/task/task.c ****         }
  66:Component/task/task.c ****     }
  67:Component/task/task.c **** #endif
  68:Component/task/task.c **** }
 194              		.loc 1 68 1 view .LVU57
 195              		@ sp needed
ARM GAS  /tmp/ccZ44inw.s 			page 6


 196              	.LVL5:
 197              		.loc 1 68 1 view .LVU58
 198 008a 10BD     		pop	{r4, pc}
 199              		.cfi_endproc
 200              	.LFE1:
 202              		.section	.text.task_on_timer,"ax",%progbits
 203              		.align	1
 204              		.p2align 2,,3
 205              		.global	task_on_timer
 206              		.syntax unified
 207              		.code	16
 208              		.thumb_func
 210              	task_on_timer:
 211              	.LVL6:
 212              	.LFB2:
  69:Component/task/task.c **** 
  70:Component/task/task.c **** /**
  71:Component/task/task.c ****  * @brief 定时器任务处理函数
  72:Component/task/task.c ****  *
  73:Component/task/task.c ****  * 当定时器触发时，调用此函数处理任务。
  74:Component/task/task.c ****  *
  75:Component/task/task.c ****  * @param self 任务处理器指针
  76:Component/task/task.c ****  * @param tick 当前时间戳
  77:Component/task/task.c ****  */
  78:Component/task/task.c **** void task_on_timer(task_t self, uint32_t tick)
  79:Component/task/task.c **** {
 213              		.loc 1 79 1 is_stmt 1 view -0
 214              		.cfi_startproc
 215              		@ args = 0, pretend = 0, frame = 0
 216              		@ frame_needed = 0, uses_anonymous_args = 0
 217              		@ link register save eliminated.
  80:Component/task/task.c ****     TASK_ASSERT(self);
 218              		.loc 1 80 22 view .LVU60
  81:Component/task/task.c ****     self->tick = tick;
 219              		.loc 1 81 5 view .LVU61
  82:Component/task/task.c ****     self->update = true;
 220              		.loc 1 82 18 is_stmt 0 view .LVU62
 221 0000 0123     		movs	r3, #1
  83:Component/task/task.c **** }
 222              		.loc 1 83 1 view .LVU63
 223              		@ sp needed
  81:Component/task/task.c ****     self->tick = tick;
 224              		.loc 1 81 16 view .LVU64
 225 0002 4160     		str	r1, [r0, #4]
  82:Component/task/task.c ****     self->update = true;
 226              		.loc 1 82 5 is_stmt 1 view .LVU65
  82:Component/task/task.c ****     self->update = true;
 227              		.loc 1 82 18 is_stmt 0 view .LVU66
 228 0004 0370     		strb	r3, [r0]
 229              		.loc 1 83 1 view .LVU67
 230 0006 7047     		bx	lr
 231              		.cfi_endproc
 232              	.LFE2:
 234              		.section	.text.task_delay,"ax",%progbits
 235              		.align	1
 236              		.p2align 2,,3
 237              		.global	task_delay
ARM GAS  /tmp/ccZ44inw.s 			page 7


 238              		.syntax unified
 239              		.code	16
 240              		.thumb_func
 242              	task_delay:
 243              	.LVL7:
 244              	.LFB3:
  84:Component/task/task.c **** 
  85:Component/task/task.c **** /**
  86:Component/task/task.c ****  * @brief  下次执行此任务延迟，设置任务的计数器值。
  87:Component/task/task.c ****  * @param  sekf 任务句柄，指向任务结构体的指针。
  88:Component/task/task.c ****  * @param  tick 延迟的节拍数。
  89:Component/task/task.c ****  * @retval 无
  90:Component/task/task.c ****  */
  91:Component/task/task.c **** void task_delay(task_t self, uint32_t tick)
  92:Component/task/task.c **** {
 245              		.loc 1 92 1 is_stmt 1 view -0
 246              		.cfi_startproc
 247              		@ args = 0, pretend = 0, frame = 0
 248              		@ frame_needed = 0, uses_anonymous_args = 0
 249              		@ link register save eliminated.
  93:Component/task/task.c ****     // 断言任务句柄不为空
  94:Component/task/task.c ****     TASK_ASSERT(self);
 250              		.loc 1 94 22 view .LVU69
  95:Component/task/task.c ****     // 设置任务的计数器值为传入的节拍数
  96:Component/task/task.c ****     self->cycle[self->index].count = tick;
 251              		.loc 1 96 5 view .LVU70
 252              		.loc 1 96 21 is_stmt 0 view .LVU71
 253 0000 8268     		ldr	r2, [r0, #8]
  97:Component/task/task.c **** }
 254              		.loc 1 97 1 view .LVU72
 255              		@ sp needed
  96:Component/task/task.c **** }
 256              		.loc 1 96 36 view .LVU73
 257 0002 5300     		lsls	r3, r2, #1
 258 0004 9B18     		adds	r3, r3, r2
 259 0006 9B00     		lsls	r3, r3, #2
 260 0008 C018     		adds	r0, r0, r3
 261              	.LVL8:
  96:Component/task/task.c **** }
 262              		.loc 1 96 36 view .LVU74
 263 000a C160     		str	r1, [r0, #12]
 264              		.loc 1 97 1 view .LVU75
 265 000c 7047     		bx	lr
 266              		.cfi_endproc
 267              	.LFE3:
 269 000e C046     		.section	.text.task_once_trigger,"ax",%progbits
 270              		.align	1
 271              		.p2align 2,,3
 272              		.global	task_once_trigger
 273              		.syntax unified
 274              		.code	16
 275              		.thumb_func
 277              	task_once_trigger:
 278              	.LVL9:
 279              	.LFB4:
  98:Component/task/task.c **** 
  99:Component/task/task.c **** /**
ARM GAS  /tmp/ccZ44inw.s 			page 8


 100:Component/task/task.c ****  * @brief 设置任务为单次触发状态
 101:Component/task/task.c ****  *
 102:Component/task/task.c ****  * 将指定索引位置的任务设置为单次触发状态。
 103:Component/task/task.c ****  *
 104:Component/task/task.c ****  * @param self 任务处理器指针
 105:Component/task/task.c ****  * @param index 任务索引
 106:Component/task/task.c ****  *
 107:Component/task/task.c ****  * @return 返回值
 108:Component/task/task.c ****  *     - -task_NO_ERROR: 成功
 109:Component/task/task.c ****  *     - -task_INDEX_ERROR: 索引超出范围
 110:Component/task/task.c ****  */
 111:Component/task/task.c **** void task_once_trigger(task_t self, uint32_t index)
 112:Component/task/task.c **** {
 280              		.loc 1 112 1 is_stmt 1 view -0
 281              		.cfi_startproc
 282              		@ args = 0, pretend = 0, frame = 0
 283              		@ frame_needed = 0, uses_anonymous_args = 0
 284              		@ link register save eliminated.
 113:Component/task/task.c ****     TASK_ASSERT(self);
 285              		.loc 1 113 22 view .LVU77
 114:Component/task/task.c **** #if ONCE_TASK_MAX_NUM > 0
 115:Component/task/task.c ****     if (index < ONCE_TASK_MAX_NUM)
 116:Component/task/task.c ****     {
 117:Component/task/task.c ****         self->once[index].flag = true;
 118:Component/task/task.c ****     }
 119:Component/task/task.c **** #endif
 120:Component/task/task.c **** }
 286              		.loc 1 120 1 is_stmt 0 view .LVU78
 287              		@ sp needed
 288 0000 7047     		bx	lr
 289              		.cfi_endproc
 290              	.LFE4:
 292 0002 C046     		.section	.text.task_once_register,"ax",%progbits
 293              		.align	1
 294              		.p2align 2,,3
 295              		.global	task_once_register
 296              		.syntax unified
 297              		.code	16
 298              		.thumb_func
 300              	task_once_register:
 301              	.LVL10:
 302              	.LFB5:
 121:Component/task/task.c **** 
 122:Component/task/task.c **** /**
 123:Component/task/task.c ****  * @brief 注册一次性任务
 124:Component/task/task.c ****  *
 125:Component/task/task.c ****  * 该函数用于注册一个一次性任务。如果任务队列未满，则将任务注册到任
 126:Component/task/task.c ****  * 如果任务队列已满，则返回错误码。
 127:Component/task/task.c ****  *
 128:Component/task/task.c ****  * @param self 任务处理器的指针
 129:Component/task/task.c ****  * @param hook 任务执行时调用的钩子函数
 130:Component/task/task.c ****  *
 131:Component/task/task.c ****  * @return 成功时返回任务的索引，失败时返回错误码 -task_FULL_ERROR
 132:Component/task/task.c ****  */
 133:Component/task/task.c **** void task_once_register(task_t self, void (*hook)(void))
 134:Component/task/task.c **** {
 303              		.loc 1 134 1 is_stmt 1 view -0
ARM GAS  /tmp/ccZ44inw.s 			page 9


 304              		.cfi_startproc
 305              		@ args = 0, pretend = 0, frame = 0
 306              		@ frame_needed = 0, uses_anonymous_args = 0
 307              		@ link register save eliminated.
 135:Component/task/task.c ****     TASK_ASSERT(self);
 308              		.loc 1 135 22 view .LVU80
 136:Component/task/task.c ****     TASK_ASSERT(hook);
 309              		.loc 1 136 22 view .LVU81
 137:Component/task/task.c **** 
 138:Component/task/task.c **** #if ONCE_TASK_MAX_NUM > 0
 139:Component/task/task.c ****     uint8_t index;
 140:Component/task/task.c ****     for (index = 0; index < ONCE_TASK_MAX_NUM; index++)
 141:Component/task/task.c ****     {
 142:Component/task/task.c ****         if (self->once[index].hook)
 143:Component/task/task.c ****         {
 144:Component/task/task.c ****             continue;
 145:Component/task/task.c ****         }
 146:Component/task/task.c ****         self->once[index].hook = hook;
 147:Component/task/task.c ****         self->once[index].flag = true;
 148:Component/task/task.c ****         return index;
 149:Component/task/task.c ****     }
 150:Component/task/task.c **** #endif
 151:Component/task/task.c **** }
 310              		.loc 1 151 1 is_stmt 0 view .LVU82
 311              		@ sp needed
 312 0000 7047     		bx	lr
 313              		.cfi_endproc
 314              	.LFE5:
 316 0002 C046     		.section	.text.task_cycle_register,"ax",%progbits
 317              		.align	1
 318              		.p2align 2,,3
 319              		.global	task_cycle_register
 320              		.syntax unified
 321              		.code	16
 322              		.thumb_func
 324              	task_cycle_register:
 325              	.LVL11:
 326              	.LFB6:
 152:Component/task/task.c **** 
 153:Component/task/task.c **** /**
 154:Component/task/task.c ****  * @brief 注册一个周期任务
 155:Component/task/task.c ****  *
 156:Component/task/task.c ****  * 将指定的钩子函数注册为一个周期任务，周期性地执行。
 157:Component/task/task.c ****  *
 158:Component/task/task.c ****  * @param cycle 任务周期，以毫秒为单位
 159:Component/task/task.c ****  * @param hook 周期任务要执行的钩子函数
 160:Component/task/task.c ****  *
 161:Component/task/task.c ****  */
 162:Component/task/task.c **** void task_cycle_register(task_t self, void (*hook)(void), uint32_t cycle)
 163:Component/task/task.c **** {
 327              		.loc 1 163 1 is_stmt 1 view -0
 328              		.cfi_startproc
 329              		@ args = 0, pretend = 0, frame = 0
 330              		@ frame_needed = 0, uses_anonymous_args = 0
 164:Component/task/task.c ****     TASK_ASSERT(self);
 331              		.loc 1 164 22 view .LVU84
 165:Component/task/task.c ****     TASK_ASSERT(hook);
ARM GAS  /tmp/ccZ44inw.s 			page 10


 332              		.loc 1 165 22 view .LVU85
 166:Component/task/task.c **** 
 167:Component/task/task.c ****     uint8_t index;
 333              		.loc 1 167 5 view .LVU86
 168:Component/task/task.c **** 
 169:Component/task/task.c **** #if CYCLE_TASK_MAX_NUM > 0
 170:Component/task/task.c ****     for (index = 0; index < CYCLE_TASK_MAX_NUM; index++)
 334              		.loc 1 170 5 view .LVU87
 335              		.loc 1 170 27 discriminator 1 view .LVU88
 171:Component/task/task.c ****     {
 172:Component/task/task.c ****         if (self->cycle[index].hook)
 336              		.loc 1 172 9 view .LVU89
 337              		.loc 1 172 31 is_stmt 0 view .LVU90
 338 0000 4369     		ldr	r3, [r0, #20]
 163:Component/task/task.c ****     TASK_ASSERT(self);
 339              		.loc 1 163 1 view .LVU91
 340 0002 10B5     		push	{r4, lr}
 341              	.LCFI2:
 342              		.cfi_def_cfa_offset 8
 343              		.cfi_offset 4, -8
 344              		.cfi_offset 14, -4
 345              		.loc 1 172 12 view .LVU92
 346 0004 002B     		cmp	r3, #0
 347 0006 11D0     		beq	.L23
 173:Component/task/task.c ****         {
 174:Component/task/task.c ****             continue;
 348              		.loc 1 174 13 is_stmt 1 view .LVU93
 170:Component/task/task.c ****     {
 349              		.loc 1 170 54 discriminator 2 view .LVU94
 350              	.LVL12:
 170:Component/task/task.c ****     {
 351              		.loc 1 170 27 discriminator 1 view .LVU95
 172:Component/task/task.c ****         {
 352              		.loc 1 172 9 view .LVU96
 172:Component/task/task.c ****         {
 353              		.loc 1 172 31 is_stmt 0 view .LVU97
 354 0008 036A     		ldr	r3, [r0, #32]
 172:Component/task/task.c ****         {
 355              		.loc 1 172 12 view .LVU98
 356 000a 002B     		cmp	r3, #0
 357 000c 04D0     		beq	.L24
 358              		.loc 1 174 13 is_stmt 1 view .LVU99
 170:Component/task/task.c ****     {
 359              		.loc 1 170 54 discriminator 2 view .LVU100
 360              	.LVL13:
 170:Component/task/task.c ****     {
 361              		.loc 1 170 27 discriminator 1 view .LVU101
 172:Component/task/task.c ****         {
 362              		.loc 1 172 9 view .LVU102
 172:Component/task/task.c ****         {
 363              		.loc 1 172 31 is_stmt 0 view .LVU103
 364 000e C36A     		ldr	r3, [r0, #44]
 365 0010 0224     		movs	r4, #2
 172:Component/task/task.c ****         {
 366              		.loc 1 172 12 view .LVU104
 367 0012 002B     		cmp	r3, #0
 368 0014 09D1     		bne	.L20
ARM GAS  /tmp/ccZ44inw.s 			page 11


 369 0016 00E0     		b	.L21
 370              	.LVL14:
 371              	.L24:
 172:Component/task/task.c ****         {
 372              		.loc 1 172 31 view .LVU105
 373 0018 0124     		movs	r4, #1
 374              	.LVL15:
 375              	.L21:
 175:Component/task/task.c ****         }
 176:Component/task/task.c ****         self->cycle[index].hook = hook;
 376              		.loc 1 176 9 is_stmt 1 view .LVU106
 377              		.loc 1 176 33 is_stmt 0 view .LVU107
 378 001a 6300     		lsls	r3, r4, #1
 379 001c 1B19     		adds	r3, r3, r4
 380 001e 9B00     		lsls	r3, r3, #2
 381 0020 C018     		adds	r0, r0, r3
 382              	.LVL16:
 177:Component/task/task.c ****         self->cycle[index].cycle = cycle;
 178:Component/task/task.c ****         self->cycle[index].count = 0;
 383              		.loc 1 178 34 view .LVU108
 384 0022 0023     		movs	r3, #0
 176:Component/task/task.c ****         self->cycle[index].cycle = cycle;
 385              		.loc 1 176 33 view .LVU109
 386 0024 4161     		str	r1, [r0, #20]
 177:Component/task/task.c ****         self->cycle[index].cycle = cycle;
 387              		.loc 1 177 9 is_stmt 1 view .LVU110
 177:Component/task/task.c ****         self->cycle[index].cycle = cycle;
 388              		.loc 1 177 34 is_stmt 0 view .LVU111
 389 0026 0261     		str	r2, [r0, #16]
 390              		.loc 1 178 9 is_stmt 1 view .LVU112
 391              		.loc 1 178 34 is_stmt 0 view .LVU113
 392 0028 C360     		str	r3, [r0, #12]
 179:Component/task/task.c ****         return;
 393              		.loc 1 179 9 is_stmt 1 view .LVU114
 394              	.L20:
 180:Component/task/task.c ****     }
 181:Component/task/task.c **** #endif
 182:Component/task/task.c **** }
 395              		.loc 1 182 1 is_stmt 0 view .LVU115
 396              		@ sp needed
 397 002a 10BD     		pop	{r4, pc}
 398              	.LVL17:
 399              	.L23:
 172:Component/task/task.c ****         {
 400              		.loc 1 172 31 view .LVU116
 401 002c 0024     		movs	r4, #0
 402 002e F4E7     		b	.L21
 403              		.cfi_endproc
 404              	.LFE6:
 406              		.text
 407              	.Letext0:
 408              		.file 2 "/home/ha/toolchain/arm-gnu-toolchain-14.3/arm-none-eabi/include/machine/_default_types.h"
 409              		.file 3 "/home/ha/toolchain/arm-gnu-toolchain-14.3/arm-none-eabi/include/sys/_stdint.h"
 410              		.file 4 "Component/task/task_define.h"
 411              		.file 5 "/home/ha/toolchain/arm-gnu-toolchain-14.3/arm-none-eabi/include/string.h"
 412              		.file 6 "<built-in>"
ARM GAS  /tmp/ccZ44inw.s 			page 12


DEFINED SYMBOLS
                            *ABS*:00000000 task.c
     /tmp/ccZ44inw.s:17     .text.task_init:00000000 $t
     /tmp/ccZ44inw.s:24     .text.task_init:00000000 task_init
     /tmp/ccZ44inw.s:53     .text.task_on_loop:00000000 $t
     /tmp/ccZ44inw.s:60     .text.task_on_loop:00000000 task_on_loop
     /tmp/ccZ44inw.s:203    .text.task_on_timer:00000000 $t
     /tmp/ccZ44inw.s:210    .text.task_on_timer:00000000 task_on_timer
     /tmp/ccZ44inw.s:235    .text.task_delay:00000000 $t
     /tmp/ccZ44inw.s:242    .text.task_delay:00000000 task_delay
     /tmp/ccZ44inw.s:270    .text.task_once_trigger:00000000 $t
     /tmp/ccZ44inw.s:277    .text.task_once_trigger:00000000 task_once_trigger
     /tmp/ccZ44inw.s:293    .text.task_once_register:00000000 $t
     /tmp/ccZ44inw.s:300    .text.task_once_register:00000000 task_once_register
     /tmp/ccZ44inw.s:317    .text.task_cycle_register:00000000 $t
     /tmp/ccZ44inw.s:324    .text.task_cycle_register:00000000 task_cycle_register

UNDEFINED SYMBOLS
memset
