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

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

?? portmacro.h

?? FreeRTOS V4.2.1,增加了AVR32 UC3 和 LPC2368 的支持
?? H
?? 第 1 頁 / 共 2 頁
字號:
  __asm__ __volatile__ (																			\
    "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_INT_SKIP_RESTORE_CONTEXT_"ASTRINGZ(__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, LWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "orh     r8, HWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "ld.w    r0, r8[0]																				\n\t"\
    "ld.w    sp, r0[0]																				\n"\
																									\
    "LABEL_INT_SKIP_RESTORE_CONTEXT_"ASTRINGZ(__LINE__)":											\n\t"\
																									\
    /* Restore ulCriticalNesting variable */														\
    "ld.w    r0, sp++																				\n\t"\
    "mov     r8, LWRD("ASTRINGZ(ulCriticalNesting)")												\n\t"\
    "orh     r8, HWRD("ASTRINGZ(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"																							\
  );																								\
																									\
  /* Force import of global symbols from assembly */												\
  ulCriticalNesting;																				\
  pxCurrentTCB;																						\
}

#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, LWRD("ASTRINGZ(ulCriticalNesting)")												\n\t"\
    "orh     r8, HWRD("ASTRINGZ(ulCriticalNesting)")												\n\t"\
    "ld.w    r0, r8[0]																				\n\t"\
    "st.w    --sp, r0"																				\
  );																								\
																									\
  /* 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, LWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "orh     r8, HWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "ld.w    r0, r8[0]																				\n\t"\
    "st.w    r0[0], sp"																				\
  );																								\
}

/*
 * 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, LWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "orh     r8, HWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "ld.w    r0, r8[0]																				\n\t"\
    "ld.w    sp, r0[0]"																				\
  );																								\
																									\
  /* Leave pxCurrentTCB variable access critical section */											\
  portEXIT_CRITICAL();																				\
																									\
  __asm__ __volatile__ (																			\
    /* Restore ulCriticalNesting variable */														\
    "ld.w    r0, sp++																				\n\t"\
    "mov     r8, LWRD("ASTRINGZ(ulCriticalNesting)")												\n\t"\
    "orh     r8, HWRD("ASTRINGZ(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"																							\
  );																								\
																									\
  /* Force import of global symbols from assembly */												\
  ulCriticalNesting;																				\
  pxCurrentTCB;																						\
}


/*
 * 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, LWRD("ASTRINGZ(ulCriticalNesting)")												\n\t"\
    "orh     r8, HWRD("ASTRINGZ(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_"ASTRINGZ(__LINE__)"										\n\t"\
																									\
    /* Store SP in the first member of the structure pointed to by pxCurrentTCB */					\
    "mov     r8, LWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "orh     r8, HWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "ld.w    r0, r8[0]																				\n\t"\
    "st.w    r0[0], sp																				\n"\
																									\
    "LABEL_ISR_SKIP_SAVE_CONTEXT_"ASTRINGZ(__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_"ASTRINGZ(__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_"ASTRINGZ(__LINE__)":C"										\
  );																								\
																									\
  /* 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_"ASTRINGZ(__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, LWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "orh     r8, HWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "ld.w    r0, r8[0]																				\n\t"\
    "ld.w    sp, r0[0]																				\n"\
																									\
    "LABEL_ISR_SKIP_RESTORE_CONTEXT_"ASTRINGZ(__LINE__)":											\n\t"\
																									\
    /* Restore ulCriticalNesting variable */														\
    "ld.w    r0, sp++																				\n\t"\
    "mov     r8, LWRD("ASTRINGZ(ulCriticalNesting)")												\n\t"\
    "orh     r8, HWRD("ASTRINGZ(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"																							\
  );																								\
																									\
  /* Force import of global symbols from assembly */												\
  ulCriticalNesting;																				\
  pxCurrentTCB;																						\
}

#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 )

#define inline

#endif /* PORTMACRO_H */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区在线影院| 亚洲高清免费观看高清完整版在线观看| 国产成人午夜精品5599 | 国产精品久久久久久妇女6080 | 精品国产乱码久久久久久图片| av亚洲精华国产精华精| 日韩成人午夜电影| 亚洲激情自拍视频| 国产精品视频一区二区三区不卡| 欧美一区二区三区影视| 欧美在线色视频| 成人av影院在线| 国产综合成人久久大片91| 亚洲国产精品一区二区久久| 国产精品剧情在线亚洲| 久久婷婷一区二区三区| 91精品一区二区三区久久久久久| 91在线码无精品| 成人黄页毛片网站| 国产91精品露脸国语对白| 麻豆极品一区二区三区| 婷婷国产在线综合| 成人av影视在线观看| 日本一区二区三区免费乱视频| 91久久精品午夜一区二区| 国产成人免费视频精品含羞草妖精| 亚洲一区视频在线| 亚洲免费观看视频| 亚洲欧美日韩一区二区三区在线观看| 国产亚洲精品bt天堂精选| www国产精品av| 精品国产免费一区二区三区四区| 欧美一区二区私人影院日本| 欧美日韩一区中文字幕| 欧美在线free| 欧美性受极品xxxx喷水| 91福利视频久久久久| 91啦中文在线观看| 99久久er热在这里只有精品15 | 精品国产乱码久久久久久久久 | 国产清纯白嫩初高生在线观看91| 国产偷国产偷亚洲高清人白洁| 日韩欧美色电影| 欧美一区二区三区精品| 日韩一级片网站| 精品成人私密视频| 欧美韩国一区二区| 国产精品久久久久久久久久久免费看| 国产精品丝袜久久久久久app| 国产精品免费久久久久| 综合久久国产九一剧情麻豆| 亚洲欧美精品午睡沙发| 亚洲激情图片qvod| 亚洲成人午夜电影| 蜜臀久久99精品久久久画质超高清| 另类成人小视频在线| 国内一区二区在线| 大白屁股一区二区视频| 91日韩一区二区三区| 欧美视频一区二| 欧美电视剧在线看免费| 国产日韩视频一区二区三区| 亚洲人123区| 天堂成人免费av电影一区| 久久精品国产精品青草| 成人免费高清视频在线观看| 色综合天天综合色综合av| 欧美日韩三级一区二区| 亚洲男人电影天堂| 一区二区三区四区精品在线视频| 亚洲中国最大av网站| 日本欧美加勒比视频| 国产一区二区三区美女| 99久久精品国产一区二区三区| 欧美亚洲综合在线| 欧美电视剧在线观看完整版| 中文字幕在线观看一区| 日韩成人av影视| 成人毛片视频在线观看| 欧美浪妇xxxx高跟鞋交| 久久精品人人做人人爽人人| 一区二区在线看| 激情综合色综合久久综合| 91蜜桃在线免费视频| 日韩精品一区二区三区视频| 国产精品久久久久久久蜜臀| 日韩高清不卡一区| 成人av网址在线观看| 91精品国产免费| 国产精品国产自产拍高清av| 日本不卡视频在线| 97久久人人超碰| 精品国产乱码久久久久久蜜臀| 国产精品久久影院| 国产一区美女在线| 色综合久久综合中文综合网| 91精品国产综合久久福利软件| 欧美激情自拍偷拍| 日本中文字幕一区| 一本一道久久a久久精品| 26uuu国产在线精品一区二区| 亚洲一二三四在线| 99久久久久久| 久久久噜噜噜久久中文字幕色伊伊| 一区二区三区在线视频播放| 国产成人在线视频网址| 538在线一区二区精品国产| 亚洲视频一区二区免费在线观看 | 久久不见久久见免费视频1 | 精品欧美乱码久久久久久| 日韩毛片视频在线看| 国产福利视频一区二区三区| 91精品国产高清一区二区三区| 亚洲综合免费观看高清完整版在线 | 欧美在线视频不卡| 国产精品私人影院| 久久久久久久久99精品| 欧美日韩一区国产| 国产精品嫩草影院com| 久久国产精品99精品国产 | 亚洲综合视频在线| 波多野结衣精品在线| 久久日韩精品一区二区五区| 日韩精品久久理论片| 欧美伊人精品成人久久综合97| 日韩理论片在线| 成人的网站免费观看| 国产日韩欧美制服另类| 国内成人精品2018免费看| 日韩欧美国产1| 美女诱惑一区二区| 日韩精品中文字幕在线不卡尤物| 免费成人av资源网| 91精品国产色综合久久| 日韩黄色免费电影| 91精品久久久久久久久99蜜臂| 五月天网站亚洲| 欧美一区二区三区四区久久| 青青草国产精品亚洲专区无| 日韩一区二区在线播放| 美国一区二区三区在线播放| 欧美一卡二卡三卡| 韩国毛片一区二区三区| 精品剧情v国产在线观看在线| 久久av老司机精品网站导航| 亚洲精品一区二区精华| 国产精品1区2区3区在线观看| 久久久www免费人成精品| 成人综合在线视频| √…a在线天堂一区| 欧美专区亚洲专区| 日韩精品久久理论片| 精品av久久707| 成人91在线观看| 伊人夜夜躁av伊人久久| 欧美肥妇毛茸茸| 精品系列免费在线观看| 日本一区二区三区四区| 色哟哟一区二区在线观看| 亚洲国产精品久久一线不卡| 日韩三级.com| 成人午夜精品一区二区三区| 亚洲蜜臀av乱码久久精品 | 日韩欧美区一区二| 国产999精品久久久久久| 亚洲人成精品久久久久久| 欧美麻豆精品久久久久久| 精品一区二区三区免费毛片爱 | 欧美日韩精品免费观看视频| 蜜桃视频免费观看一区| 国产欧美精品一区二区色综合朱莉 | 国产欧美日韩精品a在线观看| 91在线播放网址| 日本中文字幕一区| 中文字幕的久久| 7777精品伊人久久久大香线蕉 | 成人午夜电影网站| 亚洲国产va精品久久久不卡综合| 精品国产一区二区三区久久影院| 丰满少妇久久久久久久| 亚洲风情在线资源站| 久久精品亚洲精品国产欧美kt∨| 色域天天综合网| 狠狠色综合播放一区二区| 亚洲免费在线播放| 2017欧美狠狠色| 欧洲精品在线观看| 国产精品77777| 视频在线在亚洲| 一区在线播放视频| 欧美xxxxxxxx| 91网站最新网址| 国产精品一二三| 日韩国产在线观看| 依依成人综合视频| 国产欧美一区二区精品忘忧草| 欧美精品v日韩精品v韩国精品v| 色爱区综合激月婷婷| 国产一区二区美女| 亚洲精品亚洲人成人网在线播放|