×

DSP28335外扩USB的C语言源码应用程序

消耗积分:0 | 格式:rar | 大小:181 KB | 2011-06-13

dplion

分享资料个

DSP28335外扩USB的C语言源码应用程序

#include
#include "DSP2833x_Device.h"
#include "DSP2833x_Examples.h"   // DSP2833x Examples Include File

#include "type.h"
#include "sx2.h"
#include "descriptors.h"
#include "DEC28335_USB.h"
#include "ep0req.h"

BOOL Load_descriptors(char length, char* desc);
BOOL Write_SX2reg(unsigned char addr, unsigned int value);
BOOL SX2_comwritebyte(unsigned int value);
BOOL SX2_FifoWrite(int channel,unsigned int *pdata,unsigned length);
BOOL SX2_FifoWriteSingle(int channel,unsigned int pdata);
unsigned int SX2_FifoReadSingle(int channel);
interrupt void XINT3_ISR_A(void);
void InitXintf(void);
void InitGpio1(void);
void UsbReset(void);

extern char desctbl[];

unsigned char keepAliveCnt; /* counter of Timer0 interrupts */
HANDLE codec_command =0;
HANDLE codec_data=0;
unsigned int FifoWriteCnt = 0;
unsigned int epdatar[512] ={0};
unsigned int epdataw[512] ={0};
unsigned int epdataw1[256] ={0}; 

unsigned int irqValue;    /* interrupt register value */
unsigned int setupBuff[8];   /* setup transaction buffer */
BOOL sx2Ready;    /* status byte for POST */
BOOL sx2BusActivity;  /* status byte for suspend */
volatile BOOL sx2EnumOK;    /* status byte for enumeration complete volatile */
BOOL sx2EP0Buf;    /* status for endpoint 0 buffer */
BOOL sx2Setup;    /* setup flag set in Int0() ISR */
BOOL FLAGS_READ = FALSE; /*FIFO的状态读请求*/
unsigned int INT_STATUS;
unsigned int SX2_int;  

volatile BOOL readFlag;

unsigned int usbtimeout = 0x400;
unsigned int regdataread = 0; 

unsigned int Fifolong = 0;     /*FIFO的长度*/

unsigned int setupCnt = 0;
static BOOL setupDat = FALSE; 

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !