/**********************************************************************/
/*                                                                    */
/* File name: demo.h                                                  */
/*                                                                    */
/* Since:     2007-02-25                                              */
/*                                                                    */
/* Version:   uip Kernel v1.01                                        */
/*            Copyright (C) 2006..2018 Wang Baojin.                   */
/*                                                                    */
/* Author:    Designed by Wang Baojin(Íõ±£½ø)                         */
/*                                                                    */
/*                                                                    */
/* Purpose:   demo header file                                        */
/*                                                                    */
/* Distribution: This file is puip of uip kernel.                     */
/*            uip Kernel is free software; you can redistribute it    */
/*            and/or modify it under the terms of the GNU General     */
/*            Public License as published by the Free Software        */
/*            Foundation; either version 2, or (at your option)       */
/*            any later version.                                      */
/*                                                                    */
/*            uip Kernel is distributed in the hope that it will be   */
/*            useful, but WITHOUT ANY WARRANTY; without even the      */
/*            implied warranty of MERCHANTABILITY or FITNESS FOR A    */
/*            PuipICULAR PURPOSE.  See the GNU General Public         */
/*            License for more details.                               */
/*                                                                    */
/*            You should have received a copy of the GNU General      */
/*            Public License along with gpsim; see the file           */
/*            COPYING.txt. If not, write to the Free Software         */
/*            Foundation, 59 Temple Place - Suite 330,                */
/*            Boston, MA 02111-1307, USA.                             */
/*                                                                    */
/*          > A special exception to the GPL can be applied should    */
/*            you wish to distribute a combined work that includes    */
/*            uip Kernel, without being obliged to provide the        */
/*            source code for any proprietary components.             */
/*                                                                    */
/* History:                                                           */
/*   2016/06/10  [WBJ] Create this file.                              */
/*                                                                    */
/**********************************************************************/

#ifndef  __uip_APP_DEMO_H__
#define  __uip_APP_DEMO_H__

#include "uip_kernel_api.h"
#include "chip_uip_interrupt.h"

#define      APP_EVENT_TASK_0                    0x0200
#define      APP_EVENT_TASK_1                    0x0202
#define      APP_EVENT_0                         0x0001
#define      APP_EVENT_1                         0x0002

#define      RESOURCE_ID_0                       0x0000

#define      MSG_ID_0                            0x0000

#define      TASK_0_ID                           0x0000
#define      TASK_1_ID                           0x0001
#define      TASK_2_ID                           0x0002
#define      TASK_3_ID                           0x0003
#define      TASK_4_ID                           0x0004
#define      TASK_App_Idle_ID                    0x0005

#define      TASK_0_READY_PRIO                   3
#define      TASK_1_READY_PRIO                   5
#define      TASK_2_READY_PRIO                   9
#define      TASK_3_READY_PRIO                   12
#define      TASK_4_READY_PRIO                   1
#define      TASK_App_Idle_READY_PRIO            uipMinPriority

#define      TASK_0_DISPATCH_PRIO                2
#define      TASK_1_DISPATCH_PRIO                4
#define      TASK_2_DISPATCH_PRIO                7
#define      TASK_3_DISPATCH_PRIO                10
#define      TASK_4_DISPATCH_PRIO                1
#define      TASK_App_Idle_DISPATCH_PRIO         uipMinPriority

#define      RESOURCE_0_CEILING_PRIO             6

#define      APP_STACK_SIZE                      72
#define      APP_MSG_SIZE                        4
#define      APP_MSG_LENGTH                      (APP_MSG_SIZE*1)          

int main(void);

extern UIP_Exc_VectorTableEntry UIP_Exc_VectorTable[];
extern IntNumberType AppIntNumber;
extern UIP_UINT32 Chip_LPC17XX_UART1_ISR_Handler_Callback(uipIntPtr intControl);

extern uipAlarm  AppAlarm[];
extern AlarmNumberType AppAlarmNumber;
extern uipTask AppTask[];
extern TaskNumberType AppTaskNumber;
extern uipRes AppRes[];
extern ResNumberType AppResNumber;
extern uipMsg AppMsg[];
extern MsgNumberType AppMsgNumber;

#endif

