1 /***************************************************************************//**
2 * Project Name : quicksms
4 * \file serialdefs.h this file contains some enums used by CSerialPort.
6 ******************************************************************************/
13 /*********************************************************************//**
16 * Use it to select correct port parity checking.
17 ***********************************************************************/
21 PAR_NONE
, ///< no parity checking
22 PAR_EVEN
, ///< 'even' parity checking
23 PAR_ODD
///< 'odd' parity checking
33 /*********************************************************************//**
34 * \brief flow control.
36 * Used to select port flow control
38 ************************************************************************/
41 FLOW_NONE
, ///< no flow control
42 FLOW_SOFTWARE
, ///< XON/XOFF flow control
43 FLOW_HARDWARE
///< hardware flow control
46 /*********************************************************************//**
49 * this enum is used to indicate port state. Constant names are
51 ************************************************************************/
54 STAT_OK
, ///< everything's correct
55 STAT_BUSY
, ///< an r/w operation is in progress
56 STAT_IO_ERROR
, ///< I/O error occured
57 STAT_FILE_ALREADY_OPEN
, ///< port is already open, maybe by another app, or you called open() twice?
58 STAT_FILE_NOT_FOUND
, ///< port name / path is incorrect.
59 STAT_TIMEOUT
, ///< a read / write / open timeout occured
60 STAT_UNKNOWN
///< port uninitalized or in unknown state
64 /*********************************************************************//**
65 * \brief pointer to read callback function
66 * \param[in] pSize how many bytes are available?
67 * \param[in,out] pBuffer this points to recieved data
69 * if callback function is non-zero, then we can use it
70 * to immediately process incoming data as soon as it becomes available
72 ************************************************************************/
73 typedef int (*ReadCallback
)(void* pBuffer
, int &pSize
);