made by Rk
本文由浙江大学《嵌入式系统》课程提供强力支持。
感谢翁恺老师 @翁恺BA5AG
/*************************************************************/
实验要求:移植uC/OS II到RPi上,实现两个任务的调度。这两个任务能轮流点亮LED,并通过串口发送消息表明自己正在运行
下载源码
修正错误
a)makefile文件
b)注释问题
c)大小写问题
d)makefile文件名
#include "uart.h"
#include "ucos/includes.h"
#define GPSET0 0x2020001C
#define GPCLR0 0x20200028
extern void PUT32 (unsigned int , unsigned int);
extern unsigned int GET32(unsigned int);
void userApp2(void * args)
{
while(1)
{
PUT32(GPCLR0, 1<<16);
OSTimeDly(100);
uart_string("in userApp2");
OSTimeDly(100);
}
}
void userApp1(void * args)
{
while(1)
{
uart_string("in userApp1");
OSTimeDly(100);
PUT32(GPSET0, 1<<16);
OSTimeDly(100);
}
}
实验成功,ACT灯闪烁状态稳定。