⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 这个是我将UCOS移植到LPC系列的基本模版,大家可以下载下来参考下,和ZLG的完全不一样,并不是采用软中断实现任务切换,更加稳定.如果有问题可以rayeryanglei@126.com
💻 C
字号:
#include "..\include\lpc22xx.h"
#include "..\include\sd_define.h"
#include "..\include\drv_uart0.h"    
/*
void mem_copy(T_U32 *start,T_U32* end,T_U32* dst)
{
    while(start<end)
    {
        *dst = *start;
        ++dst;
        ++start;
    }            
}
*/
int main(void)
{
    uart0_open(115200,8,1,2);// even 
    //mem_copy((T_U32*)0x80000000,(T_U32*)0x80000040,(T_U32*)0x40000000);
    while(1)
    {
    #if 0
        T_U8 c = 0;
        if(uart0_getbuf(&c))
            uart0_putchar(c);            
    #else        
        T_U8 str[]="hello world!\r\n";
        uart0_sendbuf(str,sizeof(str)-1);
        DELAY_MS(1000);            
    #endif
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -