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

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

?? os_cpu_c.c

?? 基于ARM的觸摸屏幕的驅動wangqu 一定能用
?? C
字號:
/*
*********************************************************************************************************
*                                                uC/OS-II
*                                          The Real-Time Kernel
*                                       MESSAGE MAILBOX MANAGEMENT
*
*                          (c) Copyright 1992-2002, Jean J. Labrosse, Weston, FL
*                                           All Rights Reserved
*
*
*                                          ARM Specific code
*
*
* File : OS_CPU_C.C
*********************************************************************************************************
*/
#define  OS_CPU_GLOBALS
#include "../ucos-ii/includes.h"

#include "../drv/driver.h"

extern void Isr_Init(void);
extern void Isr_Start(void);
extern void Port_Init(void);
extern void InitTimer0();
/*

*********************************************************************************************************
*                                        INITIALIZE A TASK'S STACK
*
* Description: This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize the
*              stack frame of the task being created.  This function is highly processor specific.
*
* Arguments  : task          is a pointer to the task code
*
*              pdata         is a pointer to a user supplied data area that will be passed to the task
*                            when the task first executes.
*
*              ptos          is a pointer to the top of stack.  It is assumed that 'ptos' points to
*                            a 'free' entry on the task stack.  If OS_STK_GROWTH is set to 1 then 
*                            'ptos' will contain the HIGHEST valid address of the stack.  Similarly, if
*                            OS_STK_GROWTH is set to 0, the 'ptos' will contains the LOWEST valid address
*                            of the stack.
*
*              opt           specifies options that can be used to alter the behavior of OSTaskStkInit().
*                            (see uCOS_II.H for OS_TASK_OPT_???).
*
* Returns    : Always returns the location of the new top-of-stack' once the processor registers have
*              been placed on the stack in the proper order.
*
* Note(s)    : Interrupts are enabled when your task starts executing. You can change this by setting the
*              PSW to 0x0002 instead.  In this case, interrupts would be disabled upon task startup.  The
*              application code would be responsible for enabling interrupts at the beginning of the task
*              code.  You will need to modify OSTaskIdle() and OSTaskStat() so that they enable 
*              interrupts.  Failure to do this will make your system crash!
*********************************************************************************************************
*/

void *OSTaskStkInit (void (*task)(void *pd), void *pdata, void *ptos, INT16U opt)
{
    unsigned int *stk;

    opt    = opt;                           /* 'opt' is not used, prevent warning                      */
    stk    = (unsigned int *)ptos;          /* Load stack pointer                                      */

    /* build a context for the new task */
    *--stk = (unsigned int) task;       /* pc */
    *--stk = (unsigned int) task;       /* lr */

    *--stk = 0;                         /* r12 */
    *--stk = 0;                         /* r11 */
    *--stk = 0;                         /* r10 */
    *--stk = 0;                         /* r9 */
    *--stk = 0;                         /* r8 */
    *--stk = 0;                         /* r7 */
    *--stk = 0;                         /* r6 */
    *--stk = 0;                         /* r5 */
    *--stk = 0;                         /* r4 */
    *--stk = 0;                         /* r3 */
    *--stk = 0;                         /* r2 */
    *--stk = 0;                         /* r1 */
    *--stk = (unsigned int) pdata;      /* r0 */
    *--stk = (SVC32MODE|0x0);			/* cpsr  IRQ, FIQ disable*/
    *--stk = (SVC32MODE|0x0);			/* spsr  IRQ, FIQ disable */


    return ((void *)stk);
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                       OS INITIALIZATION HOOK
*                                            (BEGINNING)
*
* Description: This function is called by OSInit() at the beginning of OSInit().
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts should be disabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
void  OSInitHookBegin (void)
{
}
#endif

/*
*********************************************************************************************************
*                                       OS INITIALIZATION HOOK
*                                               (END)
*
* Description: This function is called by OSInit() at the end of OSInit().
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts should be disabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
void  OSInitHookEnd (void)
{
   // OSFPInit();
}
#endif

/*$PAGE*/
/*
*********************************************************************************************************
*                                             IDLE TASK HOOK
*
* Description: This function is called by the idle task.  This hook has been added to allow you to do  
*              such things as STOP the CPU to conserve power.
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts are enabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN && OS_VERSION >= 251
void  OSTaskIdleHook (void)
{
}
#endif

/*
*********************************************************************************************************
*                                           OSTCBInit() HOOK
*
* Description: This function is called by OS_TCBInit() after setting up most of the TCB.
*
* Arguments  : ptcb    is a pointer to the TCB of the task being created.
*
* Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
void  OSTCBInitHook (OS_TCB *ptcb)
{
    ptcb = ptcb;                                           /* Prevent Compiler warning                 */
}
#endif

/*$PAGE*/
#if OS_CPU_HOOKS_EN
/*
*********************************************************************************************************
*                                          TASK CREATION HOOK
*
* Description: This function is called when a task is created.
*
* Arguments  : ptcb   is a pointer to the task control block of the task being created.
*
* Note(s)    : 1) Interrupts are disabled during this call.
*********************************************************************************************************
*/
void OSTaskCreateHook (OS_TCB *ptcb)
{
    ptcb = ptcb;                       /* Prevent compiler warning                                     */
}


/*
*********************************************************************************************************
*                                           TASK DELETION HOOK
*
* Description: This function is called when a task is deleted.
*
* Arguments  : ptcb   is a pointer to the task control block of the task being deleted.
*
* Note(s)    : 1) Interrupts are disabled during this call.
*********************************************************************************************************
*/
void OSTaskDelHook (OS_TCB *ptcb)
{
    ptcb = ptcb;                       /* Prevent compiler warning                                     */
}

/*
*********************************************************************************************************
*                                           TASK SWITCH HOOK
*
* Description: This function is called when a task switch is performed.  This allows you to perform other
*              operations during a context switch.
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts are disabled during this call.
*              2) It is assumed that the global pointer 'OSTCBHighRdy' points to the TCB of the task that
*                 will be 'switched in' (i.e. the highest priority task) and, 'OSTCBCur' points to the 
*                 task being switched out (i.e. the preempted task).
*********************************************************************************************************
*/
void OSTaskSwHook (void)
{
}

/*
*********************************************************************************************************
*                                           STATISTIC TASK HOOK
*
* Description: This function is called every second by uC/OS-II's statistics task.  This allows your 
*              application to add functionality to the statistics task.
*
* Arguments  : none
*********************************************************************************************************
*/
void OSTaskStatHook (void)
{
}

/*
*********************************************************************************************************
*                                               TICK HOOK
*
* Description: This function is called every tick.
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
*********************************************************************************************************
*/
void MilliSecondTick(void);

void (*pre_isr)(void);
void *(*post_isr)(void);

void uHAL_DefineIRQ(void *is, void *iq, void *n)
{
	pre_isr= (void (*)(void))is;
	post_isr= (void *(*)(void))iq;
}//uHAL_DefineIRQ


INT32 uHAL_RequestSystemTimer(void *tick, const INT8U *str)
{
	return 1;
}//uHALr_RequestSystemTimer

void BreakPoint(void)
{
	while(1);
}//BreakPoint

void OSTimeTickHook (void)
{
}
#endif

#define BUILD_DATE "Build Date: " __DATE__ "\n"


/*
 * Initialize an ARM Target board
 */
void
 ARMTargetInit(void)
{
	/* ---- disable interrupts (IRQs) --------------------------------- */
	ARMDisableInt();
	/*-----Init S3C44B0X IO PORTs----------------------------------*/
	  Port_Init();
	//uHAL_InitPort();
	/* ---- soft vectors ---------------------------------------------- */
	/* Define pre & post-process routines for Interrupt */
	uHAL_DefineIRQ((void *)IrqStart, (void *)IrqFinish, (void *) 0);
	//rSYSCFG=CACHECFG;			//CACHE on infulence the system stability
   	//Init GPS and GSM Uart Port/BaudRate

 	//These following 2 function shoul be call at last
	Isr_Init();
    	InitTimer0();
	Uart_Init(0,19200);
	//Uart_Set(0,19200,1);
	//Uart_Set(0,115200,0);
	
	//NF_Init();	
	//FlashInit();

	Lcd_Init();
	TOUCH_Init();
}                               /* targetInit */

/* start the ARM target running */
void
 ARMTargetStart(void)
{
    /* request the system timer */
    if (uHAL_RequestSystemTimer(
                                 (void *) OSTimeTick,
                                 (const unsigned char *)"uCOS-II") <= 0)
    {
        	//uHAL_Printf("Timer/IRQ busy\n");
    }

    /* Start system timer & enable the interrupt. */
    Isr_Start();
   
    
}

extern void IRQContextSwap(void);   /* post DispatchIRQ processing (the _real_ one) */

/* just 'notice' that we need to change context [called in OSIntExit]*/
int need_to_swap_context = 0 ;
void OSIntCtxSw(void) {
    need_to_swap_context = 1;
}

/* This is what uCOS does at the start of an IRQ */
void IrqStart(void)
{
    /* increment nesting counter */
    OSIntNesting++;
}


/* This is what uCOS does at the end of an IRQ */
void *IrqFinish(void)
{
	OSIntExit() ;
	
	if (need_to_swap_context) {
		need_to_swap_context = 0 ;
		return ((void *)IRQContextSwap) ;
	} else {
		return (void *)0;
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91尤物视频在线观看| 久久久久97国产精华液好用吗| 成人激情图片网| 欧美电视剧免费观看| 欧美激情一区二区三区全黄| 日本高清不卡在线观看| 国产一区二区毛片| 午夜一区二区三区在线观看| 亚洲日本免费电影| 日本精品一级二级| 亚洲自拍偷拍av| 成人免费视频国产在线观看| 国产综合色精品一区二区三区| 91精品国产高清一区二区三区| 亚洲一二三四区| 欧美综合欧美视频| 一区在线中文字幕| 成人自拍视频在线观看| 国产欧美精品一区aⅴ影院 | 久久精品人人做人人爽人人| 中文字幕亚洲一区二区va在线| 国产美女视频一区| 亚洲欧洲制服丝袜| 欧美电影免费观看高清完整版在线观看| 国产成人av影院| 欧美精品一区二区三区很污很色的| 午夜精品一区二区三区电影天堂 | 亚洲精品一二三区| 国产一区二区三区视频在线播放| 久久午夜老司机| 99久久伊人久久99| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 日韩黄色片在线观看| 色成年激情久久综合| 日韩视频在线你懂得| 亚洲一区欧美一区| 91久久免费观看| 午夜精品123| 91极品美女在线| 亚洲女人的天堂| 99久久精品一区二区| 一区二区欧美国产| 欧美色倩网站大全免费| 国产精品一区二区久久不卡| 久久精品一区二区| 色综合久久99| 亚洲卡通动漫在线| 欧美日韩一卡二卡三卡| 激情六月婷婷综合| 亚洲黄色片在线观看| 在线亚洲人成电影网站色www| 国产中文一区二区三区| 亚洲欧洲av在线| 精品免费国产二区三区| 国产日产亚洲精品系列| 日韩一区在线播放| 午夜视频一区二区三区| 成人黄色777网| 国产一区在线看| 精彩视频一区二区三区| 久久精品水蜜桃av综合天堂| 成人在线综合网站| 日韩福利视频导航| 免费日本视频一区| 午夜精品免费在线| 亚洲成av人综合在线观看| 国产精品久久久久一区二区三区共| 亚洲精品一区二区三区影院 | 亚洲综合色在线| 亚洲一区在线观看免费观看电影高清| 中文字幕亚洲区| 亚洲福利视频一区| 国产福利电影一区二区三区| 国产1区2区3区精品美女| 日韩视频在线你懂得| 在线电影院国产精品| 在线免费观看日本一区| 成人aa视频在线观看| 国内精品第一页| 精品亚洲国内自在自线福利| 首页国产丝袜综合| 国产在线国偷精品免费看| 激情丁香综合五月| 国产一区二区精品久久99| 国产馆精品极品| 日韩精品一区二区三区中文精品| 久久久久久久久久久久久久久99| 国产精品天干天干在观线| 亚洲欧美视频在线观看视频| 午夜欧美一区二区三区在线播放| 久久精品理论片| 欧美一区二区在线视频| 一区二区欧美视频| a美女胸又www黄视频久久| 日韩一区二区在线观看| 亚洲国产精品久久不卡毛片| 成人午夜av在线| 精品成人一区二区三区四区| 亚洲精品视频观看| 成熟亚洲日本毛茸茸凸凹| 99视频精品在线| 亚洲国产高清不卡| 国产99精品国产| 国产精品美女一区二区| 精品国产伦一区二区三区观看方式| 一区二区三区在线视频观看| 国产福利一区在线| 欧美日韩1234| 亚洲欧美一区二区三区孕妇| 精品亚洲国内自在自线福利| 欧美三级中文字幕在线观看| 国产精品私人自拍| 91麻豆视频网站| 久久精品水蜜桃av综合天堂| 另类小说视频一区二区| 日韩欧美专区在线| 国产精品美女久久久久久2018| 日本伊人精品一区二区三区观看方式| 成人avav影音| 亚洲va欧美va天堂v国产综合| 欧美日韩一区久久| 日韩精品1区2区3区| 9191成人精品久久| 喷水一区二区三区| 久久精品人人做人人爽97| 99久久精品情趣| 亚洲18色成人| 日韩欧美在线一区二区三区| 国内精品久久久久影院薰衣草 | 最近日韩中文字幕| 欧美在线啊v一区| 麻豆精品国产传媒mv男同| 久久久久久久久一| 欧日韩精品视频| 国产在线视频不卡二| 精品成人a区在线观看| 五月天激情综合| www成人在线观看| 欧美午夜片在线看| 丁香婷婷综合网| 丝袜美腿高跟呻吟高潮一区| 中文字幕一区二区在线观看| 欧美一区二区观看视频| 国产成人免费在线观看| 亚洲一区二区黄色| 亚洲欧美日韩国产中文在线| 日韩欧美在线123| 99国产精品久| av综合在线播放| 99视频热这里只有精品免费| 国产麻豆精品视频| 国产精品综合网| 大桥未久av一区二区三区中文| 国内精品伊人久久久久影院对白| 男人操女人的视频在线观看欧美| 日韩理论片网站| 偷拍自拍另类欧美| 亚洲一区自拍偷拍| 亚洲激情在线播放| 亚洲色图另类专区| 亚洲人成网站在线| 一区二区理论电影在线观看| 亚洲综合免费观看高清完整版在线| 有坂深雪av一区二区精品| 亚洲一区二区欧美激情| 午夜一区二区三区在线观看| 午夜一区二区三区在线观看| 日韩高清欧美激情| 久久成人免费日本黄色| 国产成人精品一区二区三区网站观看| 国产福利一区在线观看| 欧美理论在线播放| 欧美性感一类影片在线播放| 在线不卡欧美精品一区二区三区| 精品久久久久久久久久久久久久久| 国产精品一区二区在线观看不卡| 久久精子c满五个校花| 国产欧美精品一区| 国内成人免费视频| 91精品国产综合久久久久久漫画 | 奇米777欧美一区二区| 日本aⅴ亚洲精品中文乱码| 国产精品一级片| 91蝌蚪国产九色| 欧美日韩你懂得| 欧美精品第1页| 26uuu色噜噜精品一区二区| 欧美一级片在线看| 2020国产精品自拍| 国产精品无遮挡| 日本女优在线视频一区二区| 亚洲在线视频一区| 国产精品资源网| 亚洲视频一区二区在线观看| 久久 天天综合| 色狠狠一区二区| 日本一区二区三级电影在线观看| 亚洲精品日韩专区silk| 91免费版pro下载短视频| 久久久久久久久岛国免费|