rs485 working again. had to add termios stuff and set baud
parent
f7fc00d5c0
commit
26fe06fcc7
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,18 +1,22 @@
|
||||
#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();
|
||||
|
||||
void ps_bus_start();
|
||||
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;
|
||||
};
|
||||
|
||||
void p_sbus_start(void);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue