
typedef struct
{
    int dataBits;
    int stopBits;
    int parity;
} ttyOptions;

#define STOP_BIT(bits)  (bits == 2 ? STOPB : 0)
#define PARITY(bits) (bits == 2 ? PARENB : (bits == 1 ? PARODD | PARENB : 0))

