📄 jd5xxevm.c
字号:
/*********************************************************************
* (C) COPYRIGHT TEXAS INSTRUMENTS, INC. 1996 *
**********************************************************************/
/* jd5xxevm.c
* 'C54x EVM JPEG Decompression - EVM Functions
* This file contains all functions used by the EVM to communicate
* with the host.
*
* Kamal Swamidoss
* Texas Instruments
* 4 July 1996
*/
#include "jd5xx.h"
/* EVM I/O addresses for PC/EVM interface (see EVM Tech. Ref. p.3-7) */
ioport unsigned int port10; /* EVM channel A */
ioport int port12; /* EVM channel B */
ioport unsigned int port14; /* EVM status reg. */
void send_command(unsigned int);
void initialize(void)
{
asm("init1 XC 2,BIO ");
asm(" B init1 ");
asm("init2 XC 2,NBIO");
asm(" B init2 ");
asm("init3 XC 2,BIO ");
asm(" B init3 ");
send_command(ACK);
}
void send_command(unsigned int cmd)
{
port10 = cmd;
while (axst());
}
void send_data(int data)
{
port12 = data;
}
int receive_data(void)
{
int tmp;
tmp = port12;
return(tmp);
}
unsigned int receive_command(void)
{
unsigned int tmp;
while (!arst());
tmp = port10;
return(tmp);
}
int axst(void)
{
unsigned int tmp;
tmp = port14;
tmp = tmp & AXST;
if (tmp == AXST)
return(1);
return(0);
}
int arst(void)
{
unsigned int tmp;
tmp = port14;
tmp = tmp & ARST;
if (tmp == ARST)
return(1);
return(0);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -