re-grouped members for better readability
This commit is contained in:
parent
7db31d1ae4
commit
fb54e0fac8
1 changed files with 15 additions and 7 deletions
22
comport.c
22
comport.c
|
|
@ -50,7 +50,11 @@ MP 20100201 use a buffer for writes, write takes place during clock callback com
|
||||||
|
|
||||||
typedef struct comport
|
typedef struct comport
|
||||||
{
|
{
|
||||||
|
/* basic object properties */
|
||||||
t_object x_obj;
|
t_object x_obj;
|
||||||
|
t_outlet *x_data_outlet;
|
||||||
|
t_outlet *x_status_outlet;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
HANDLE comhandle; /* holds the comport handle */
|
HANDLE comhandle; /* holds the comport handle */
|
||||||
DCB dcb; /* holds the comm pars */
|
DCB dcb; /* holds the comm pars */
|
||||||
|
|
@ -62,10 +66,12 @@ typedef struct comport
|
||||||
struct termios com_termio; /* for the new com config */
|
struct termios com_termio; /* for the new com config */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* device specifications */
|
||||||
t_symbol *serial_device;
|
t_symbol *serial_device;
|
||||||
char serial_device_prefix[FILENAME_MAX];/* the device name without the number */
|
char serial_device_prefix[FILENAME_MAX];/* the device name without the number */
|
||||||
short comport; /* holds the comport # */
|
short comport; /* holds the comport # */
|
||||||
|
|
||||||
|
/* device configuration */
|
||||||
t_float baud; /* holds the current baud rate */
|
t_float baud; /* holds the current baud rate */
|
||||||
t_float data_bits; /* holds the current number of data bits */
|
t_float data_bits; /* holds the current number of data bits */
|
||||||
t_float parity_bit; /* holds the current parity */
|
t_float parity_bit; /* holds the current parity */
|
||||||
|
|
@ -75,19 +81,21 @@ typedef struct comport
|
||||||
int hupcl; /* nonzero if hang-up on close is on */
|
int hupcl; /* nonzero if hang-up on close is on */
|
||||||
|
|
||||||
short rxerrors; /* holds the rx line errors */
|
short rxerrors; /* holds the rx line errors */
|
||||||
t_clock *x_clock;
|
|
||||||
int x_hit;
|
|
||||||
int x_retries;
|
|
||||||
int x_retry_count;
|
|
||||||
double x_deltime;
|
|
||||||
int verbose;
|
int verbose;
|
||||||
t_outlet *x_data_outlet;
|
|
||||||
t_outlet *x_status_outlet;
|
/* buffers */
|
||||||
unsigned char *x_inbuf; /* read incoming serial to here */
|
unsigned char *x_inbuf; /* read incoming serial to here */
|
||||||
unsigned char *x_outbuf; /* write outgoing serial from here */
|
unsigned char *x_outbuf; /* write outgoing serial from here */
|
||||||
int x_inbuf_len; /* length of inbuf */
|
int x_inbuf_len; /* length of inbuf */
|
||||||
int x_outbuf_len; /* length of outbuf */
|
int x_outbuf_len; /* length of outbuf */
|
||||||
int x_outbuf_wr_index; /* offset to next free location in x_outbuf */
|
int x_outbuf_wr_index; /* offset to next free location in x_outbuf */
|
||||||
|
|
||||||
|
/* self-polling */
|
||||||
|
t_clock *x_clock;
|
||||||
|
double x_deltime;
|
||||||
|
int x_hit;
|
||||||
|
int x_retries;
|
||||||
|
int x_retry_count;
|
||||||
} t_comport;
|
} t_comport;
|
||||||
|
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue