UTILIA s.r.o. | Vývoj a výroba elektronických zařízení |
PC karty pro příjem teletextu s vývojovým prostředím
unit ttxrecdef;
interface
const
//VXD initialization function results
TTXRecOK = 0;
TTXRecVXDNotFound = 1;
TTXRecChannelOpened = 2;
TTXRecCardNotFound = 3;
TTXRecBinFileError = 4;
TTXRecDownloadError = 5;
//Current VXD type
TTXRecVXDW95Static = 0;
TTXRecVXDW95Dynamic = 1;
TTXRecVXDNT = 2;
//Packet test result
TTXRecNoPacket = 255;
TTXRecInvalidPacket = 254;
type
TTTXRecPacket = packed record
case integer of
0 : (Data : array [0..41] of byte);
1 : (Magazine : byte;
PacketNum : byte;
PgNumU : byte;
PgNumD : byte;
SbPg0,SbPg1,SbPg2,SbPg3 : byte);
end;
TTTXRecHWPacket = packed record
case Integer of
0 : (Data : array [0..51] of byte);
1 : (TVLineNum : byte;
{0 : TV Line
Number, 5-22}
FramePos : byte;
{1 : Frame
Position, 0..15, typically 8}
Data0 : byte;
{2
: Clock $55}
Data1 : byte;
{3
: Frame $27}
TTXRecPacket : TTTXRecPacket; {4 : 42
teletext data bytes}
);
end;
implementation
end.
unit ttxrecdll;
interface
uses
//Constants and structures definition
ttxrecdef;
//Initialization - Windows 95
function TTXRecCreateM (Channel : integer) : integer; stdcall;
//Initialization - Windows NT
function TTXRecCreateNT : integer; stdcall;
//Initialization - Windows 95, dynamic loading ! NOT IMPLEMETED !
function TTXRecCreateD (ABaseAddress,AIrq : integer) : integer; stdcall;
//Finalization
procedure TTXRecFree; stdcall;
//Test if eletext packet ready
function TTXRecPacketReady : boolean; stdcall;
//Note : Each teletext packet can be read only ones
//Reading teletext packet, standard teletext data + some ather
function TTXRecGetHWPacket (var TTXRecHWPacket : TTTXRecHWPacket) : integer; stdcall;
//Reading teletext packet, standard teletext data
function TTXRecGetPacket (var TTXRecPacket : TTTXRecPacket) : integer; stdcall;
//Geting page number from teletext packet, valid only for packets 0
function TTXRecPageNumFromPacket (var TTXRecPacket : TTTXRecPacket) : integer; stdcall;
//Geting sub page number from teletext packet, valid only for packets 0
function TTXRecSubPageNumFromPacket (var TTXRecPacket : TTTXRecPacket) : integer; stdcall;
//Decode data from Hemming coded byte, if error, result is FFh
function TTXRecFromHemm (B : byte) : byte; stdcall;
//Return interupts count from program started
function TTXRecGetIRQCount : integer; stdcall;
//Swith beetween decadic and hec page numbers
procedure TTXRecPageNumInHex (APageNumInHex : boolean); stdcall;
//Tune tuner, frequnce is in kHz
procedure TTXRecSetTuner (Freq {[kHz]} : integer); stdcall;
//Return true if tuner present on teletext card
function TTXRecTunerPresent : boolean; stdcall;
//Decode data from byte with parity, if error, result is FFh
function TTXRecFromParity (B : byte) : byte; stdcall;
Hlavní stránka UTILIA | PC karty pro příjem teletextu |