From: AceVest Date: Mon, 18 Jun 2018 09:48:35 +0000 (+0800) Subject: ... X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/ddns-confgen.html?a=commitdiff_plain;h=9d1baca216a7697c95a9f68cdd0e768e0e7842e5;p=acecode.git ... --- diff --git a/arduino/hardware/ace/avr/cores/avr/kernel.cpp b/arduino/hardware/ace/avr/cores/avr/kernel.cpp index 17b1cd6..95495ee 100644 --- a/arduino/hardware/ace/avr/cores/avr/kernel.cpp +++ b/arduino/hardware/ace/avr/cores/avr/kernel.cpp @@ -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);