/*--------------------------------------------------------------------------------
'Nom du projet : Oscilloscope
'Outil : Visual C++ 6
'Nom du fichier: Port.h
'Realisation:Mathieu Texier et Emmanuel Traineau
'Date: Juin 2003
'Responsable: Eric Meleiro
'--------------------------------------------------------------------------------
*/
#if !defined(AFX_PORT_H__1F6E6501_A1B5_11D7_98DA_00A04B01B08E__INCLUDED_)
#define AFX_PORT_H__1F6E6501_A1B5_11D7_98DA_00A04B01B08E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <mmsystem.h>
#define BUFFER_LENGHT 1024
class CPort
{
public:
CPort();
virtual ~CPort();
void HandlePort();
void BiteHorloge();
char LecturePort();
void Exporter();
unsigned char PortDonne;
unsigned char PortEtat;
unsigned char PortCommande;
/*
// * information sur le port parrallèle (toutes les broches n'ont pas étais testé)
PortDonne = _outp(0x378,0); // Lecture & ecriture D7 D6 D5 D4 D3 D2 D1 D0
PortEtat = _inp(0x379); // lecture /BUSY ACK PE SELECT /ERROR X X X
PortCommande = _inp(0x37A); // lecture & ecriture X X BIT CTRL IRQ ENABLE SELECT IN /INIT AUTOFEED /STROBE
BYTE BrocheBUSY = BYTE (PortEtat)&0x08;
BYTE BrocheACK = BYTE (PortEtat)&0x10;
BYTE BrochePE = BYTE (PortEtat)&0x20;
BYTE BrocheSELECT = BYTE (PortEtat)&0x40;
BYTE BrocheERROR = BYTE (PortEtat)&0x80;
BYTE BrocheBIT_CTRL = BYTE (PortCommande)&0x01;
BYTE BrocheIRQ_ENABLE = BYTE (PortCommande)&0x02;
BYTE BrocheSELECT_IN = BYTE (PortCommande)&0x04;
BYTE BrocheINIT = BYTE (PortCommande)&0x08;
BYTE BrocheAUTOFEED = BYTE (PortCommande)&0x10;
BYTE BrocheSTROBE = BYTE (PortCommande)&0x20;
BYTE EndOfConvertion = ~BrocheACK;
short int BiteHorloge;
*/
int DivPlageCourante;
};
#endif // !defined(AFX_PORT_H__1F6E6501_A1B5_11D7_98DA_00A04B01B08E__INCLUDED_)