mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
Remove __fastcall calling convention
This commit is contained in:
@@ -15,7 +15,7 @@ typedef void(__stdcall *OutPortType)(USHORT BasePort, USHORT value);
|
||||
InPortType InPort;
|
||||
OutPortType OutPort;
|
||||
|
||||
bool __fastcall TLPT::Connect(int port)
|
||||
bool TLPT::Connect(int port)
|
||||
{
|
||||
// ladowanie dll-ki
|
||||
hDLL = LoadLibrary("inpout32.dll");
|
||||
@@ -41,4 +41,4 @@ bool __fastcall TLPT::Connect(int port)
|
||||
return bool(OutPort);
|
||||
};
|
||||
|
||||
void __fastcall TLPT::Out(int x) { // wys³anie bajtu do portu OutPort(address, x); };
|
||||
void TLPT::Out(int x) { // wys³anie bajtu do portu OutPort(address, x); };
|
||||
|
||||
@@ -10,7 +10,7 @@ class TLPT
|
||||
int address;
|
||||
|
||||
public:
|
||||
bool __fastcall Connect(int port);
|
||||
void __fastcall Out(int x);
|
||||
bool Connect(int port);
|
||||
void Out(int x);
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -33,7 +33,7 @@ __fastcall TPoKeys55::TPoKeys55()
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TPoKeys55::~TPoKeys55() { Close(); };
|
||||
//---------------------------------------------------------------------------
|
||||
bool __fastcall TPoKeys55::Close()
|
||||
bool TPoKeys55::Close()
|
||||
{ // roz³¹czenie komunikacji
|
||||
if (WriteHandle != INVALID_HANDLE_VALUE)
|
||||
CloseHandle(WriteHandle);
|
||||
@@ -43,7 +43,7 @@ bool __fastcall TPoKeys55::Close()
|
||||
ReadHandle = INVALID_HANDLE_VALUE;
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
bool __fastcall TPoKeys55::Connect()
|
||||
bool TPoKeys55::Connect()
|
||||
{ // Ra: to jest do wyczyszcznia z niepotrzebnych zmiennych i komunikatów
|
||||
Close();
|
||||
GUID InterfaceClassGuid = {0x4d1e55b2, 0xf16f, 0x11cf, 0x88, 0xcb, 0x00,
|
||||
@@ -194,7 +194,7 @@ bool __fastcall TPoKeys55::Connect()
|
||||
return false;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
bool __fastcall TPoKeys55::Write(unsigned char c, unsigned char b3, unsigned char b4,
|
||||
bool TPoKeys55::Write(unsigned char c, unsigned char b3, unsigned char b4,
|
||||
unsigned char b5)
|
||||
{
|
||||
DWORD BytesWritten = 0;
|
||||
@@ -221,7 +221,7 @@ bool __fastcall TPoKeys55::Write(unsigned char c, unsigned char b3, unsigned cha
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool __fastcall TPoKeys55::Read()
|
||||
bool TPoKeys55::Read()
|
||||
{
|
||||
DWORD BytesRead = 0;
|
||||
InputBuffer[0] = 0; // The first byte is the "Report ID" and does not get transmitted over the
|
||||
@@ -236,7 +236,7 @@ bool __fastcall TPoKeys55::Read()
|
||||
return (BytesRead == 65) ? InputBuffer[7] == cRequest : false;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
bool __fastcall TPoKeys55::ReadLoop(int i)
|
||||
bool TPoKeys55::ReadLoop(int i)
|
||||
{ // próbuje odczytaæ (i) razy
|
||||
do
|
||||
{
|
||||
@@ -247,7 +247,7 @@ bool __fastcall TPoKeys55::ReadLoop(int i)
|
||||
return false;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
AnsiString __fastcall TPoKeys55::Version()
|
||||
AnsiString TPoKeys55::Version()
|
||||
{ // zwraca numer wersji, funkcja nieoptymalna czasowo (czeka na odpowiedŸ)
|
||||
if (!WriteHandle)
|
||||
return "";
|
||||
@@ -280,14 +280,14 @@ AnsiString __fastcall TPoKeys55::Version()
|
||||
return "";
|
||||
};
|
||||
|
||||
bool __fastcall TPoKeys55::PWM(int x, float y)
|
||||
bool TPoKeys55::PWM(int x, float y)
|
||||
{ // ustawienie wskazanego PWM (@12Mhz: 12000=1ms=1000Hz)
|
||||
// iPWM[7]=1024; //1024==85333.3333333333ns=11718.75Hz
|
||||
iPWM[x] = int(0.5f + 0x0FFF * y) & 0x0FFF; // 0x0FFF=4095
|
||||
return true;
|
||||
}
|
||||
|
||||
bool __fastcall TPoKeys55::Update(bool pause)
|
||||
bool TPoKeys55::Update(bool pause)
|
||||
{ // funkcja powinna byæ wywo³ywana regularnie, np. raz w ka¿dej ramce ekranowej
|
||||
if (pause)
|
||||
{ // specjalna procedura, jeœli utracone po³¹czenie spowodowa³o pauzê
|
||||
|
||||
@@ -16,17 +16,17 @@ class TPoKeys55
|
||||
public:
|
||||
float fAnalog[7]; // wejœcia analogowe, stan <0.0,1.0>
|
||||
int iInputs[8];
|
||||
__fastcall TPoKeys55();
|
||||
__fastcall ~TPoKeys55();
|
||||
bool __fastcall Connect();
|
||||
bool __fastcall Close();
|
||||
bool __fastcall Write(unsigned char c, unsigned char b3, unsigned char b4 = 0,
|
||||
TPoKeys55();
|
||||
~TPoKeys55();
|
||||
bool Connect();
|
||||
bool Close();
|
||||
bool Write(unsigned char c, unsigned char b3, unsigned char b4 = 0,
|
||||
unsigned char b5 = 0);
|
||||
bool __fastcall Read();
|
||||
bool __fastcall ReadLoop(int i);
|
||||
AnsiString __fastcall Version();
|
||||
bool __fastcall PWM(int x, float y);
|
||||
bool __fastcall Update(bool pause);
|
||||
bool Read();
|
||||
bool ReadLoop(int i);
|
||||
AnsiString Version();
|
||||
bool PWM(int x, float y);
|
||||
bool Update(bool pause);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user