echo befehl funktioniert
This commit is contained in:
parent
a68bb3aecc
commit
c108303ba3
9 changed files with 98 additions and 3 deletions
25
drv/b15f.h
25
drv/b15f.h
|
@ -2,6 +2,20 @@
|
|||
#define B15F_h
|
||||
|
||||
#include <iostream>
|
||||
#include <bits/stdc++.h>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <cstdlib>
|
||||
#include <cstdint>
|
||||
|
||||
/*#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <termios.h>*/
|
||||
|
||||
#include "driverexception.h"
|
||||
|
||||
|
||||
class B15F
|
||||
{
|
||||
|
@ -9,10 +23,21 @@ private:
|
|||
B15F(void); // privater Konstruktor
|
||||
public:
|
||||
void init(void);
|
||||
bool testConnection(void);
|
||||
void writeByte(uint8_t);
|
||||
uint8_t readByte(void);
|
||||
|
||||
static B15F& getInstance(void);
|
||||
|
||||
private:
|
||||
std::fstream usart;
|
||||
|
||||
static B15F* instance;
|
||||
|
||||
// CONSTANTS
|
||||
const std::string SERIAL_DEVICE = "/dev/ttyUSB0";
|
||||
constexpr static uint8_t MSG_OK = 0xFF;
|
||||
constexpr static uint8_t MSG_FAIL = 0xFE;
|
||||
};
|
||||
|
||||
#endif // B15F_h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue