mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
Merge 4a0b38570b232aedab5480673342edc8d49475ee into 69e0372cf0d3796e84ce9a09aff1d74496f68720
This commit is contained in:
commit
c76e5cc30a
@ -20,7 +20,36 @@
|
||||
#include <pthread.h>
|
||||
|
||||
#if defined(__linux__)
|
||||
# include <linux/serial.h>
|
||||
// # include <linux/serial.h> // alpine throwing dependency error.
|
||||
#define ASYNCB_SPD_HI 4 /* Use 57600 instead of 38400 bps */
|
||||
#define ASYNCB_SPD_VHI 5 /* Use 115200 instead of 38400 bps */
|
||||
#define ASYNCB_SPD_SHI 12 /* Use 230400 instead of 38400 bps */
|
||||
#define ASYNC_SPD_HI (1U << ASYNCB_SPD_HI)
|
||||
#define ASYNC_SPD_VHI (1U << ASYNCB_SPD_VHI)
|
||||
#define ASYNC_SPD_SHI (1U << ASYNCB_SPD_SHI)
|
||||
#define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI)
|
||||
#define ASYNC_SPD_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI)
|
||||
struct serial_struct {
|
||||
int type;
|
||||
int line;
|
||||
unsigned int port;
|
||||
int irq;
|
||||
int flags;
|
||||
int xmit_fifo_size;
|
||||
int custom_divisor;
|
||||
int baud_base;
|
||||
unsigned short close_delay;
|
||||
char io_type;
|
||||
char reserved_char[1];
|
||||
int hub6;
|
||||
unsigned short closing_wait; /* time to wait before closing */
|
||||
unsigned short closing_wait2; /* no longer used... */
|
||||
unsigned char *iomem_base;
|
||||
unsigned short iomem_reg_shift;
|
||||
unsigned int port_high;
|
||||
unsigned long iomap_base; /* cookie passed into ioremap */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#include <sys/select.h>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user