我们从2011年坚守至今,只想做存粹的技术论坛。  由于网站在外面,点击附件后要很长世间才弹出下载,请耐心等待,勿重复点击不要用Edge和IE浏览器下载,否则提示不安全下载不了

 找回密码
 立即注册
搜索
查看: 632|回复: 0

usb测试

[复制链接]

该用户从未签到

4

主题

8

回帖

2

积分

一级逆天

天行健,君子以自强不

积分
2

社区居民

QQ
发表于 2015-8-25 22:19:42 | 显示全部楼层 |阅读模式
#include <string.h>
#include ".\Target\option.h"
#include ".\Target\def.h"
#include ".\Target\44b.h"
#include ".\Target\44blib.h"
#include ".\usb\usbdrv.h"
#include ".\usb\Usb_reg.h"

#include <stdio.h>
/********************************************/
//   ARMSYS实验十四:USB接口应用实验
//   描述:从USB接口接收自PC机发送的文本文件                    
/********************************************/
void (*runinram)(void)=(void (*)(void))RAM_ADDRESS;
extern byte USBN9604_init(void);
byte code_loaded=0;

int Main(void)
{
    int i,j;
    int time = 100000 * 60;
    char aa;
    rSYSCFG=CACHECFG;    // Using 8KB Cache//
    Port_Init();
    Uart_Init(0,115200);
    Beep(0x01);
    Led_Display(0xf);
    Delay(0);

    Uart_Select(0); //Select UART0//
    Uart_Printf("\n*************************************************************************");
    Beep(0x00);
    Uart_Printf("\n*                           立泰电子                                     *");
    Uart_Printf("\n*                      -USB Test Program-                               *");
    Uart_Printf("\n*                          Version 1.11                                 *");
    Uart_Printf("\n*                Email:rao_dali@263.net                                 *");
    Uart_Printf("\n*             UART Config--COM:115.2kbps,8Bit,NP,UART0                  *");

    Led_Display(0x0);
    Uart_Printf("\n*----------------Begin test USB? (Y/N)----------------------------------*");
    Led_Display(0x0);

    aa= Uart_Getch();
    if((aa=='Y')||(aa=='y'))
    {
        if(USBN9604_init())
        {
            Uart_Printf("\nThe USB chip is not stable or reset failed.");
            return 1;
        }
        else
        Uart_Printf("\nThe USB chip is now active!");   
    }
    else
        Uart_Printf("\nUSB is inactive!");
    rINTCON=0x5;//fiq disable
   
    while(1);
   
    return 0;
}
刚把得
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

论坛开启做任务可以
额外奖励金币快速赚
积分升级了


Copyright ©2011-2024 NTpcb.com All Right Reserved.  Powered by Discuz! (NTpcb)

本站信息均由会员发表,不代表NTpcb立场,如侵犯了您的权利请发帖投诉

平平安安
TOP
快速回复 返回顶部 返回列表