How To Implement The Ioctl In The Source Code To Configure The Com Ports - Eurotech DynaGate 10-12 Series User Manual

Automobile iot edge gateway ti am335x, lte cat 1
Table of Contents

Advertisement

11 How to access interfaces under Linux
11.9.1.2

How to implement the ioctl in the source code to configure the COM ports

To implement the ioctl in the source code, enter the following commands:
/*Ioctl to read */
#define TIOCGRS485
/*Ioctl to write */
#define TIOCSRS485
Definition of the flags bit
/*FLAGS */
//#define SER_RS485_ENABLED
/* Logical level for RTS pin when sending */
//#define SER_RS485_RTS_ON_SEND
/* Logical level for RTS pin after sent*/
//#define SER_RS485_RTS_AFTER_SEND
//#define SER_RS485_RX_DURING_TX
/* Inverted logic level for RS485 gpio */
#define SER_RS485_INVERT
/* if enabled serial line drivers must be configured in HiZ*/
#define SER_HIZ_ENABLED
Linux kernel data structure
struct serial_rs485 {
};
70 / 94
__u32
flags;
__u32
delay_rts_before_send;
__u32
delay_rts_after_send;
__u32
padding[5];
DynaGATE 10-12 User manual Rev. 0-14
0x542E
0x542F
(1 << 0)
(1 << 1)
(1 << 2)
(1 << 4)
(1 << 5)
(1 << 31)
/* RS485 feature flags */
/* Delay before send (milliseconds) */
/* Delay after send (milliseconds) */
/* Memory is cheap, new structs

Advertisement

Table of Contents
loading

Table of Contents