#ifndef _SELECT_SUPPORT_H
#define _SELECT_SUPPORT_H

#ifdef __cplusplus
extern "C"
{
#endif

#include "termios.h"

struct ser_select_t {
    fd_set *readset;
    int *trgEvent;
    int *gotEvent;
    struct timeval **timeout;
    int (*selectEvent)(int);
    void *scb[SERIAL_MAX]; // Used to communicate with serl_select_off
};

extern int sockLocalfd[];
extern int NAserialComPortFds[];

extern void serl_select_off(struct ser_select_t * selinfo);
extern int serl_select_on(struct ser_select_t * selinfo, struct timeval *notimeout);

#ifdef __cplusplus
}
#endif

#endif
