-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.c
54 lines (44 loc) · 1.03 KB
/
main.c
1
#include "stm32f10x.h"#include "delay.h"#include "usart.h"#include "sys.h"#include "stdio.h"#include "LCD12864.h"//#include "key.h"#include "Hios_API.h"//测试操作系统使用u8 Dir=KEY_RIGHT;u8 GolbalX=0,GolbalY=0;//u8 AuxSeekPri[8]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};//辅助寻找最高优先级u8 LockCount=0;u32 GlobalTicks=0;//全局变量u8 HardTrigPendSv=TICKSCHEDCLR;//硬件systick触发pendSv调度u8 Task1Stack[STACKSIZE];//Hios.h里定义u8 Task2Stack[STACKSIZE];u8 Task3Stack[STACKSIZE];u8 NoIdleStack[STACKSIZE];u8 RootStack[STACKSIZE];H_PCB NewPcb;H_PCB* GlobalPcb=&NewPcb;H_PCB* RootPCB;H_PCB* NoIdlePCB;H_PCB* Task1PCB;H_PCB* Task2PCB;H_PCB* Task3PCB;STACKREG* CurStackRegAdr;STACKREG* NextStackRegAdr;ReadyTable GlobalTable;//ready表H_LIST GlobalDealyTable;//delay表H_LIST* watch;H_PCB* watchPcb;//systick中断在stm32f10x_it.c里int main(void){ //创建根任务 RootPCB=HIOS_StartInit(); //调用根任务 HIOS_TaskStart(RootPCB);// return 0;}