11
*/
#include "stdio.h"
#include "conio.h"
#include "graphics.h"
#include "string.h"
#include "io.h"
#define BIT0 0x01
#define BIT1 0x02
#define BIT2 0x04
#define BIT3 0x08
#define BIT4 0x10
#define BIT5 0x20
#define BIT6 0x40
#define BIT7 0x80
#define IO_Base
0xA00
#define CDS_PORT 4
#define CDO_PORT 3
void Init_DIO_Default()
{
}
/*-----------------------------------------------
@brief : Set CD_OPEN power level
@Input : Level-- 0:Low 1: High
------------------------------------------------*/
void Set_CD_OPEN(int Level)
{ int t;
if(Level)
{ outportb(CDO_PORT,inportb(CDO_PORT)|BIT0);
printf(" CD_OPEN is High \n");
}
else
{
outportb(CDO_PORT,inportb(CDO_PORT) &~BIT0);
printf("CD_OPEN is Low\n");
}
}
/*-----------------------------------------------
@brief : Get CD_SENSE low active
@Return : 1:Low active with no jitter
------------------------------------------------*/
int Get_CD_SENSE_Status()