main.c
来自「关于DMA通道编程 学习用软件控制硬件」· C语言 代码 · 共 61 行
C
61 行
#include <stdlib.h>
#include <string.h>
#include "def.h"
#include "option.h"
#include "2440addr.h"
#include "2440lib.h"
#include "2440slib.h"
extern void Test_DMA(void);
void Main(void)
{
U8 idx;
Port_Init();
Uart_Init( 0,115200 );
Uart_Select(0);
Beep(2000, 100);
while(1)
{
Uart_Printf("test menu \n");
Uart_Printf("1: test DMA\n");
Uart_Printf("0: exit \n");
Uart_Printf("\nPlease select function : \n");
idx = Uart_GetIntNum_GJ();
if (idx == 0)
break;
switch(idx)
{
case 1: //exit test
Test_DMA();
break;
default:
break;
}
if((idx == 1) ||(idx==2))
{
Uart_Printf("Test End,Press any key continue\n");
Uart_Getch();
}
else if (idx == 0)
break;
}
Uart_Printf("\nExit test\n");
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?