亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? portmacro.h

?? FreeRTOS V4.2.1,增加了AVR32 UC3 和 LPC2368 的支持
?? H
?? 第 1 頁 / 共 2 頁
字號:
    "brhi    LABEL_INT_SKIP_RESTORE_CONTEXT_%[LINE]"												\
    :																								\
    : [LINE] "i" (__LINE__)																			\
  );																								\
																									\
  /* Else */																						\
  /* because it is here safe, always call vTaskSwitchContext() since an OS tick occurred. */		\
  /* A critical section has to be used here because vTaskSwitchContext handles FreeRTOS linked lists. */\
  portENTER_CRITICAL();																				\
  vTaskSwitchContext();																				\
  portEXIT_CRITICAL();																				\
																									\
  /* Restore all registers */																		\
																									\
  __asm__ __volatile__ (																			\
    /* Set SP to point to new stack */																\
    "mov     r8, LO(%[pxCurrentTCB])																\n\t"\
    "orh     r8, HI(%[pxCurrentTCB])																\n\t"\
    "ld.w    r0, r8[0]																				\n\t"\
    "ld.w    sp, r0[0]																				\n"\
																									\
    "LABEL_INT_SKIP_RESTORE_CONTEXT_%[LINE]:														\n\t"\
																									\
    /* Restore ulCriticalNesting variable */														\
    "ld.w    r0, sp++																				\n\t"																			\
    "mov     r8, LO(%[ulCriticalNesting])															\n\t"\
    "orh     r8, HI(%[ulCriticalNesting])															\n\t"\
    "st.w    r8[0], r0																				\n\t"\
																									\
    /* Restore R0..R7 */																			\
    "ldm     sp++, r0-r7																			\n\t"\
																									\
    /* Now, the stack should be R8..R12, LR, PC and SR */											\
    "rete"																							\
    :																								\
    : [ulCriticalNesting] "i" (&ulCriticalNesting),													\
      [pxCurrentTCB] "i" (&pxCurrentTCB),															\
      [LINE] "i" (__LINE__)																			\
  );																								\
}

#endif


/*
 * portSAVE_CONTEXT_SCALL() for SupervisorCALL exception.
 *
 * NOTE: taskYIELD()(== SCALL) MUST NOT be called in a mode > supervisor mode.
 *
 */
#define portSAVE_CONTEXT_SCALL()															\
{																							\
  extern volatile unsigned portLONG ulCriticalNesting;										\
  extern volatile void *volatile pxCurrentTCB;												\
																							\
  /* Warning: the stack layout after SCALL doesn't match the one after an interrupt. */		\
  /* If SR[M2:M0] == 001 */																	\
  /*    PC and SR are on the stack.  */														\
  /* Else (other modes) */																	\
  /*    Nothing on the stack. */															\
																							\
  /* WARNING NOTE: the else case cannot happen as it is strictly forbidden to call */		\
  /* vTaskDelay() and vTaskDelayUntil() OS functions (that result in a taskYield()) */		\
  /* in an interrupt|exception handler. */													\
																							\
  __asm__ __volatile__ (																	\
    /* in order to save R0-R7 */															\
    "sub     sp, 6*4																		\n\t"\
    /* Save R0..R7 */																		\
    "stm     --sp, r0-r7																	\n\t"\
																							\
    /* in order to save R8-R12 and LR */													\
    /* do not use SP if interrupts occurs, SP must be left at bottom of stack */			\
    "sub     r7, sp,-16*4																	\n\t"\
    /* Copy PC and SR in other places in the stack. */										\
    "ld.w    r0, r7[-2*4]																	\n\t" /* Read SR */\
    "st.w    r7[-8*4], r0																	\n\t" /* Copy SR */\
    "ld.w    r0, r7[-1*4]																	\n\t" /* Read PC */\
    "st.w    r7[-7*4], r0																	\n\t" /* Copy PC */\
																							\
    /* Save R8..R12 and LR on the stack. */													\
    "stm     --r7, r8-r12, lr																\n\t"\
																							\
    /* Arriving here we have the following stack organizations: */							\
    /* R8..R12, LR, PC, SR, R0..R7. */														\
																							\
    /* Now we can finalize the save. */														\
																							\
    /* Save ulCriticalNesting variable  - R0 is overwritten */								\
    "mov     r8, LO(%[ulCriticalNesting])													\n\t"\
    "orh     r8, HI(%[ulCriticalNesting])													\n\t"\
    "ld.w    r0, r8[0]																		\n\t"\
    "st.w    --sp, r0"																		\
    :																						\
    : [ulCriticalNesting] "i" (&ulCriticalNesting)											\
  );																						\
																							\
  /* Disable the its which may cause a context switch (i.e. cause a change of */			\
  /* pxCurrentTCB). */																		\
  /* Basically, all accesses to the pxCurrentTCB structure should be put in a */			\
  /* critical section because it is a global structure. */									\
  portENTER_CRITICAL();																		\
																							\
  /* Store SP in the first member of the structure pointed to by pxCurrentTCB */			\
  __asm__ __volatile__ (																	\
    "mov     r8, LO(%[pxCurrentTCB])														\n\t"\
    "orh     r8, HI(%[pxCurrentTCB])														\n\t"\
    "ld.w    r0, r8[0]																		\n\t"\
    "st.w    r0[0], sp"																		\
    :																						\
    : [pxCurrentTCB] "i" (&pxCurrentTCB)													\
  );																						\
}

/*
 * portRESTORE_CONTEXT() for SupervisorCALL exception.
 */
#define portRESTORE_CONTEXT_SCALL()															\
{																							\
  extern volatile unsigned portLONG ulCriticalNesting;										\
  extern volatile void *volatile pxCurrentTCB;												\
																							\
  /* Restore all registers */																\
																							\
  /* Set SP to point to new stack */														\
  __asm__ __volatile__ (																	\
    "mov     r8, LO(%[pxCurrentTCB])														\n\t"\
    "orh     r8, HI(%[pxCurrentTCB])														\n\t"\
    "ld.w    r0, r8[0]																		\n\t"\
    "ld.w    sp, r0[0]"																		\
    :																						\
    : [pxCurrentTCB] "i" (&pxCurrentTCB)													\
  );																						\
																							\
  /* Leave pxCurrentTCB variable access critical section */									\
  portEXIT_CRITICAL();																		\
																							\
  __asm__ __volatile__ (																	\
    /* Restore ulCriticalNesting variable */												\
    "ld.w    r0, sp++																		\n\t"\
    "mov     r8, LO(%[ulCriticalNesting])													\n\t"\
    "orh     r8, HI(%[ulCriticalNesting])													\n\t"\
    "st.w    r8[0], r0																		\n\t"\
																							\
    /* skip PC and SR */																	\
    /* do not use SP if interrupts occurs, SP must be left at bottom of stack */			\
    "sub     r7, sp, -10*4																	\n\t"\
    /* Restore r8-r12 and LR */																\
    "ldm     r7++, r8-r12, lr																\n\t"\
																							\
    /* RETS will take care of the extra PC and SR restore. */								\
    /* So, we have to prepare the stack for this. */										\
    "ld.w    r0, r7[-8*4]																	\n\t" /* Read SR */\
    "st.w    r7[-2*4], r0																	\n\t" /* Copy SR */\
    "ld.w    r0, r7[-7*4]																	\n\t" /* Read PC */\
    "st.w    r7[-1*4], r0																	\n\t" /* Copy PC */\
																							\
    /* Restore R0..R7 */																	\
    "ldm     sp++, r0-r7																	\n\t"\
																							\
    "sub     sp, -6*4																		\n\t"\
																							\
    "rets"																					\
    :																						\
    : [ulCriticalNesting] "i" (&ulCriticalNesting)											\
  );																						\
}


/*
 * The ISR used depends on whether the cooperative or
 * the preemptive scheduler is being used.
 */
#if configUSE_PREEMPTION == 0

/*
 * ISR entry and exit macros.  These are only required if a task switch
 * is required from the ISR.
 */
#define portENTER_SWITCHING_ISR()															\
{																							\
  /* Save R0..R7 */																			\
  __asm__ __volatile__ ("stm     --sp, r0-r7");												\
																							\
  /* With the cooperative scheduler, as there is no context switch by interrupt, */			\
  /* there is also no context save. */														\
}

/*
 * Input parameter: in R12, boolean. Perform a vTaskSwitchContext() if 1
 */
#define portEXIT_SWITCHING_ISR()															\
{																							\
  __asm__ __volatile__ (																	\
    /* Restore R0..R7 */																	\
    "ldm     sp++, r0-r7																	\n\t"\
																							\
    /* With the cooperative scheduler, as there is no context switch by interrupt, */		\
    /* there is also no context restore. */													\
    "rete"																					\
  );																						\
}

#else

/*
 * ISR entry and exit macros.  These are only required if a task switch
 * is required from the ISR.
 */
#define portENTER_SWITCHING_ISR()															\
{																							\
  extern volatile unsigned portLONG ulCriticalNesting;										\
  extern volatile void *volatile pxCurrentTCB;												\
																							\
  /* When we come here */																	\
  /* Registers R8..R12, LR, PC and SR had already been pushed to system stack */			\
																							\
  __asm__ __volatile__ (																	\
    /* Save R0..R7 */																		\
    "stm     --sp, r0-r7																	\n\t"\
																							\
    /* Save ulCriticalNesting variable  - R0 is overwritten */								\
    "mov     r8, LO(%[ulCriticalNesting])													\n\t"\
    "orh     r8, HI(%[ulCriticalNesting])													\n\t"\
    "ld.w    r0, r8[0]																		\n\t"\
    "st.w    --sp, r0																		\n\t"\
																									\
    /* Check if INT0 or higher were being handled (case where the OS tick interrupted another */	\
    /* interrupt handler (which was of a higher priority level but decided to lower its priority */	\
    /* level and allow other lower interrupt level to occur). */									\
    /* In this case we don't want to do a task switch because we don't know what the stack */		\
    /* currently looks like (we don't know what the interrupted interrupt handler was doing). */	\
    /* Saving SP in pxCurrentTCB and then later restoring it (thinking restoring the task) */		\
    /* will just be restoring the interrupt handler, no way!!! */									\
    /* So, since we won't do a vTaskSwitchContext(), it's of no use to save SP. */					\
    "ld.w    r0, sp[9*4]																	\n\t" /* Read SR in stack */\
    "bfextu  r0, r0, 22, 3																	\n\t" /* Extract the mode bits to R0. */\
    "cp.w    r0, 1																			\n\t" /* Compare the mode bits with supervisor mode(b'001) */\
    "brhi    LABEL_ISR_SKIP_SAVE_CONTEXT_%[LINE]											\n\t"\
																							\
    /* Store SP in the first member of the structure pointed to by pxCurrentTCB */			\
    "mov     r8, LO(%[pxCurrentTCB])														\n\t"\
    "orh     r8, HI(%[pxCurrentTCB])														\n\t"\
    "ld.w    r0, r8[0]																		\n\t"\
    "st.w    r0[0], sp																		\n"\
																							\
    "LABEL_ISR_SKIP_SAVE_CONTEXT_%[LINE]:"													\
    :																						\
    : [ulCriticalNesting] "i" (&ulCriticalNesting),											\
      [pxCurrentTCB] "i" (&pxCurrentTCB),													\
      [LINE] "i" (__LINE__)																	\
  );																						\
}

/*
 * Input parameter: in R12, boolean. Perform a vTaskSwitchContext() if 1
 */
#define portEXIT_SWITCHING_ISR()															\
{																							\
  extern volatile unsigned portLONG ulCriticalNesting;										\
  extern volatile void *volatile pxCurrentTCB;												\
																							\
  __asm__ __volatile__ (																	\
    /* Check if INT0 or higher were being handled (case where the OS tick interrupted another */		\
    /* interrupt handler (which was of a higher priority level but decided to lower its priority */		\
    /* level and allow other lower interrupt level to occur). */										\
    /* In this case it's of no use to switch context and restore a new SP because we purposedly */		\
    /* did not previously save SP in its TCB. */																				\
    "ld.w    r0, sp[9*4]																	\n\t" /* Read SR in stack */\
    "bfextu  r0, r0, 22, 3																	\n\t" /* Extract the mode bits to R0. */\
    "cp.w    r0, 1																			\n\t" /* Compare the mode bits with supervisor mode(b'001) */\
    "brhi    LABEL_ISR_SKIP_RESTORE_CONTEXT_%[LINE]											\n\t"\
																							\
    /* If a switch is required then we just need to call */									\
    /* vTaskSwitchContext() as the context has already been */								\
    /* saved. */																			\
    "cp.w    r12, 1																			\n\t" /* Check if Switch context is required. */\
    "brne    LABEL_ISR_RESTORE_CONTEXT_%[LINE]"												\
    :																						\
    : [LINE] "i" (__LINE__)																	\
  );																						\
																							\
  /* A critical section has to be used here because vTaskSwitchContext handles FreeRTOS linked lists. */	\
  portENTER_CRITICAL();																		\
  vTaskSwitchContext();																		\
  portEXIT_CRITICAL();																		\
																							\
  __asm__ __volatile__ (																	\
    "LABEL_ISR_RESTORE_CONTEXT_%[LINE]:														\n\t"\
    /* Restore the context of which ever task is now the highest */							\
    /* priority that is ready to run. */													\
																							\
    /* Restore all registers */																\
																							\
    /* Set SP to point to new stack */														\
    "mov     r8, LO(%[pxCurrentTCB])														\n\t"\
    "orh     r8, HI(%[pxCurrentTCB])														\n\t"\
    "ld.w    r0, r8[0]																		\n\t"\
    "ld.w    sp, r0[0]																		\n"\
																							\
    "LABEL_ISR_SKIP_RESTORE_CONTEXT_%[LINE]:												\n\t"\
																							\
    /* Restore ulCriticalNesting variable */												\
    "ld.w    r0, sp++																		\n\t"\
    "mov     r8, LO(%[ulCriticalNesting])													\n\t"\
    "orh     r8, HI(%[ulCriticalNesting])													\n\t"\
    "st.w    r8[0], r0																		\n\t"\
																							\
    /* Restore R0..R7 */																	\
    "ldm     sp++, r0-r7																	\n\t"\
																							\
    /* Now, the stack should be R8..R12, LR, PC and SR  */									\
    "rete"																					\
    :																						\
    : [ulCriticalNesting] "i" (&ulCriticalNesting),											\
      [pxCurrentTCB] "i" (&pxCurrentTCB),													\
      [LINE] "i" (__LINE__)																	\
  );																						\
}

#endif


#define portYIELD()                 {__asm__ __volatile__ ("scall");}

/* Task function macros as described on the FreeRTOS.org WEB site. */
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )


#endif /* PORTMACRO_H */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合色视频| 亚洲精品久久7777| 91精品蜜臀在线一区尤物| 91在线观看高清| 91影视在线播放| 色猫猫国产区一区二在线视频| www.66久久| 色噜噜偷拍精品综合在线| 91小视频免费观看| 91视频观看免费| 欧美亚洲禁片免费| 欧美日韩亚洲综合| 欧美高清激情brazzers| 欧美一级在线视频| 久久婷婷综合激情| 国产精品久久一级| 亚洲黄色小视频| 日韩av在线播放中文字幕| 另类成人小视频在线| 国产真实乱子伦精品视频| 国产69精品久久99不卡| 91蜜桃在线观看| 制服丝袜亚洲播放| 久久久久99精品一区| 亚洲欧美aⅴ...| 欧美aaaaa成人免费观看视频| 国产一区二区免费视频| aaa欧美日韩| 日韩三级精品电影久久久| 久久精品免费在线观看| 亚洲精品国产无套在线观| 日韩国产精品久久久久久亚洲| 精品一区二区三区免费| 国产91在线看| 欧美放荡的少妇| 久久久精品日韩欧美| 亚洲精品欧美激情| 精品亚洲国产成人av制服丝袜| 99国产精品久久久久久久久久 | 成人午夜在线播放| 91香蕉视频mp4| 欧美精品一区二区不卡| 亚洲综合丝袜美腿| 国产99久久久久| 欧美一区二区三区视频免费 | 国产视频一区在线播放| 依依成人精品视频| 国产精品综合一区二区| 色一情一乱一乱一91av| 欧美zozozo| 亚洲电影一区二区三区| 成人精品小蝌蚪| 精品久久久网站| 午夜欧美一区二区三区在线播放| 国产盗摄一区二区三区| 欧美一区二区黄| 亚洲一区二区av在线| 顶级嫩模精品视频在线看| 欧美一级精品在线| 亚洲一区精品在线| 波多野结衣中文字幕一区二区三区 | 国产精品99久久久久久有的能看| 91成人免费在线视频| 国产精品午夜在线观看| 久久99九九99精品| 日韩一卡二卡三卡国产欧美| 夜色激情一区二区| 色狠狠一区二区三区香蕉| 亚洲品质自拍视频网站| 不卡的av在线播放| 18涩涩午夜精品.www| 99久久免费精品高清特色大片| 精品久久久久久久久久久久久久久久久 | 国产一区日韩二区欧美三区| 欧美片网站yy| 日本亚洲视频在线| 91精品国产免费久久综合| 日韩专区在线视频| 日韩欧美国产高清| 成人综合在线观看| 国产午夜精品在线观看| 国产精品18久久久久久久久久久久| 欧美一区二区美女| 久久精品99国产精品| 精品成人私密视频| 高清成人免费视频| 日韩美女啊v在线免费观看| 97久久超碰国产精品| 一区二区三区四区在线免费观看| 91免费观看在线| 亚洲成人先锋电影| 日韩午夜激情电影| 国产成人亚洲综合a∨婷婷图片| 国产三级一区二区| 91免费版pro下载短视频| 午夜一区二区三区视频| 51精品国自产在线| 国产成人精品三级| 伊人一区二区三区| 精品国产一区久久| 99久久国产综合精品色伊| 亚洲综合激情另类小说区| 欧美一区三区四区| 国产91精品入口| 午夜亚洲福利老司机| 欧美精品一区二区在线播放| 99精品视频在线播放观看| 亚洲国产色一区| 久久人人97超碰com| 91精品1区2区| 黄一区二区三区| 亚洲欧美乱综合| 日韩精品中文字幕一区二区三区| 成人性生交大片免费看在线播放| 一区二区高清视频在线观看| 欧美成va人片在线观看| 91国模大尺度私拍在线视频| 国产原创一区二区三区| 亚洲成人福利片| 中文字幕一区不卡| 精品少妇一区二区三区免费观看| 99视频超级精品| 国产在线看一区| 午夜精品福利久久久| 欧美韩国日本综合| 日韩精品一区二区三区三区免费| 99国产精品久久久久久久久久| 美女国产一区二区| 性做久久久久久免费观看欧美| 国产欧美日韩综合| 日韩精品一区二区三区视频播放 | 色视频一区二区| 成人精品免费网站| 国产精一区二区三区| 久久国产麻豆精品| 日本一道高清亚洲日美韩| 亚洲一区二区在线免费观看视频| 欧美国产精品一区二区| 日韩精品一区二区三区在线播放 | 91亚洲国产成人精品一区二三| 精品一区二区在线免费观看| 亚洲国产aⅴ天堂久久| 亚洲视频免费观看| 中文字幕在线观看不卡| 欧美国产日本韩| 欧美国产日韩一二三区| 国产拍揄自揄精品视频麻豆| 337p日本欧洲亚洲大胆色噜噜| 欧美成人vps| 欧美mv日韩mv| 久久青草欧美一区二区三区| 日韩欧美国产精品| 久久综合成人精品亚洲另类欧美 | 国产成人精品亚洲午夜麻豆| 久久精品国产精品青草| 玖玖九九国产精品| 久久国产尿小便嘘嘘尿| 午夜久久久久久久久| 91高清视频在线| 婷婷夜色潮精品综合在线| 亚洲视频小说图片| 亚洲视频每日更新| 久久久三级国产网站| 777欧美精品| 精品一二三四区| 精品日本一线二线三线不卡| 最新国产精品久久精品| 久久精品国产精品青草| 91久久久免费一区二区| 国产区在线观看成人精品| 亚洲电影一级片| 色综合久久综合| 久久女同性恋中文字幕| 日韩vs国产vs欧美| 在线视频国内自拍亚洲视频| 国产精品美女一区二区三区| 美女久久久精品| 欧美丰满少妇xxxbbb| 亚洲免费观看高清| 岛国av在线一区| 欧美精品一区二区三| 日韩精品每日更新| 在线精品亚洲一区二区不卡| 亚洲国产精品成人综合色在线婷婷| 蜜臀久久99精品久久久久宅男| 在线亚洲免费视频| 自拍av一区二区三区| 国产精品资源网| 精品久久久久久久久久久久久久久 | 成人午夜电影网站| 日韩免费看的电影| 男人的j进女人的j一区| 欧美日韩一区高清| 亚洲1区2区3区视频| 欧美视频在线播放| 亚洲国产视频在线| 在线成人免费视频| 亚洲成人免费av| 欧美人xxxx| 免费成人在线网站|