mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 12:39:18 +02:00
pch migration to modules [wip]
This commit is contained in:
44
Console/PoKeys55.cppm
Normal file
44
Console/PoKeys55.cppm
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
module;
|
||||
#include <string>
|
||||
|
||||
export module eu07.console.pokeys55;
|
||||
|
||||
export {
|
||||
class TPoKeys55
|
||||
{ // komunikacja z PoKeys bez określania przeznaczenia pinów
|
||||
unsigned char cRequest; // numer żądania do sprawdzania odpowiedzi
|
||||
unsigned char OutputBuffer[65]; // Allocate a memory buffer equal to our endpoint size + 1
|
||||
unsigned char InputBuffer[65]; // Allocate a memory buffer equal to our endpoint size + 1
|
||||
int iPWM[8]; // 0-5:wyjścia PWM,6:analogowe,7:częstotliwośc PWM
|
||||
int iPWMbits;
|
||||
int iLastCommand;
|
||||
int iFaza;
|
||||
int iRepeats; // liczba powtórzeń
|
||||
bool bNoError; // zerowany po przepełnieniu licznika powtórzeń, ustawiany po udanej operacji
|
||||
public:
|
||||
float fAnalog[7]; // wejścia analogowe, stan <0.0,1.0>
|
||||
int iInputs[8];
|
||||
TPoKeys55();
|
||||
~TPoKeys55();
|
||||
bool Connect();
|
||||
void Close();
|
||||
bool Write(unsigned char c, unsigned char b3, unsigned char b4 = 0, unsigned char b5 = 0);
|
||||
bool Read();
|
||||
bool ReadLoop(int i);
|
||||
std::string Version();
|
||||
bool PWM(int x, float y);
|
||||
bool Update(bool pause);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
} // export
|
||||
Reference in New Issue
Block a user