You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
366 B
C++

#ifndef __P_SERIAL_BUS_H__
#define __P_SERIAL_BUS_H__
#include "p_serial_packet.h"
#include <linux/serial.h>
#include <termio.h>
class ps_bus
{
public:
ps_bus(const char* dev);
~ps_bus();
bool send_pkt(const ps_packet* const pkt);
bool recv_pkt(ps_packet* const pkt);
private:
struct serial_rs485 rs485conf;
int dev_fd;
struct termios toptions;
};
#endif