]> Zhao Yanbai Git Server - acecode.git/commitdiff
...
authorAceVest <zhaoyanbai@126.com>
Mon, 18 Jun 2018 09:48:35 +0000 (17:48 +0800)
committerAceVest <zhaoyanbai@126.com>
Mon, 18 Jun 2018 09:48:35 +0000 (17:48 +0800)
arduino/hardware/ace/avr/cores/avr/kernel.cpp

index 17b1cd6aae77662c169726627c8132a15c70cc3b..95495ee5a201bae1c9034739432caf8a04018ff0 100644 (file)
@@ -70,6 +70,7 @@ void create_task(void (*handler)(), uint8_t *stack, uint8_t priority)
 
     t->stack = stack + TASK_STACK_SIZE - 3;
     uint8_t *p = t->stack;
+    // 貌似atmega328p执行RET会弹出3个字节给到PC寄存器
     *(p+0) = (((uint32_t)handler) >> 16);
     *(p+1) = (((uint32_t)handler) >> 8);
     *(p+2) = (((uint32_t)handler) >> 0);