Buffer Interface
Macros | Typedefs | Enumerations | Functions
BFSerial.h File Reference
#include "BFDef.h"

Go to the source code of this file.

Macros

#define BFSERIALEXPORT   __declspec(dllexport)
 
#define BFSERIALCC   __cdecl
 
#define BFCL_ERROR_SERNOTFOUND   -1000
 
#define BFCL_ERROR_BRDNOTFOUND   -1001
 
#define BFCL_ERROR_BRDOPEN   -1002
 
#define BFCL_ERROR_THRE   -1003
 
#define BFCL_ERROR_TEMT   -1004
 
#define BFCL_ERROR_FIFO_EN   -1005
 
#define BFCL_ERROR_RCVRFIFO   -1006
 
#define BFCL_ERROR_BAUDRATE   -1008
 
#define BFCL_ERROR_DATABITS   -1009
 
#define BFCL_ERROR_PARITY   -1010
 
#define BFCL_ERROR_15STOP5DATA   -1011
 
#define BFCL_ERROR_2STOP5DATA   -1012
 
#define BFCL_ERROR_STOPBITS   -1013
 
#define BFCL_ERROR_NOSIGNAL   -1014
 
#define BFCL_ERROR_NOSTRUC   -1016
 
#define BFCL_ERROR_NULLPTR   -1017
 
#define BFCL_ERROR_BYTES_AVAIL   -1018
 
#define BFCL_ERROR_FLUSH_PORT   -1019
 
#define BFCL_ERROR_DATA_IN   -1020
 
#define BFCL_WARN_SIG_CANCEL   -1015
 

Typedefs

typedef struct _SerialMutexes SerialMutexes
 
typedef struct _SerialMutexes * SerialMutexesPtr
 
typedef struct _SerRefStruc SerRefStruc
 
typedef struct _SerRefStruc * pSerRefStruc
 
typedef enum _DataBits DataBits
 
typedef enum _DataBitsDataBitsPtr
 
typedef enum _Parity Parity
 
typedef enum _ParityParityPtr
 
typedef enum _StopBits StopBits
 
typedef enum _StopBitsStopBitsPtr
 

Enumerations

enum  _DataBits { DataBits_5 = 0, DataBits_6, DataBits_7, DataBits_8 }
 
enum  _Parity { ParityEven = 0, ParityOdd, ParityNone }
 
enum  _StopBits { StopBits_1 = 0, StopBits_15, StopBits_2 }
 

Functions

BFSERIALEXPORT int BFSERIALCC clBFSerialSettings (void *serBFRef, unsigned int baudRate, unsigned int dataBits, unsigned int parity, unsigned int stopBits)
 
BFSERIALEXPORT int BFSERIALCC clBFSerialRead (void *serBFRef, char *buffer, unsigned int *bufferSize)
 
BFSERIALEXPORT int BFSERIALCC clBFSerialCancelRead (void *serBFRef)
 
BFSERIALEXPORT int BFSERIALCC clBFGetBaudRate (void *serBFRef, unsigned int *baudRate)
 
BFSERIALEXPORT int BFSERIALCC clBFSerialInitFromBoardHandle (Bd hBoard, void **serialRefPtr)
 
BFSERIALEXPORT int BFSERIALCC clBFGetSerialRef (unsigned int portNum, void **serBFRefPtr)
 
BFSERIALEXPORT int BFSERIALCC clBFGetSerialRefFromBoardHandle (Bd hBoard, void **serBFRefPtr)
 
BFSERIALEXPORT BFRC BFSERIALCC BFSVersion (PBFU32 pMajorVersion, PBFU32 pMinorVersion)
 

Macro Definition Documentation

#define BFCL_ERROR_15STOP5DATA   -1011
#define BFCL_ERROR_2STOP5DATA   -1012
#define BFCL_ERROR_BAUDRATE   -1008
#define BFCL_ERROR_BRDNOTFOUND   -1001
#define BFCL_ERROR_BRDOPEN   -1002
#define BFCL_ERROR_BYTES_AVAIL   -1018
#define BFCL_ERROR_DATA_IN   -1020
#define BFCL_ERROR_DATABITS   -1009
#define BFCL_ERROR_FIFO_EN   -1005
#define BFCL_ERROR_FLUSH_PORT   -1019
#define BFCL_ERROR_NOSIGNAL   -1014
#define BFCL_ERROR_NOSTRUC   -1016
#define BFCL_ERROR_NULLPTR   -1017
#define BFCL_ERROR_PARITY   -1010
#define BFCL_ERROR_RCVRFIFO   -1006
#define BFCL_ERROR_SERNOTFOUND   -1000
#define BFCL_ERROR_STOPBITS   -1013
#define BFCL_ERROR_TEMT   -1004
#define BFCL_ERROR_THRE   -1003
#define BFCL_WARN_SIG_CANCEL   -1015
#define BFSERIALCC   __cdecl
#define BFSERIALEXPORT   __declspec(dllexport)

Typedef Documentation

typedef enum _DataBits DataBits
typedef enum _DataBits * DataBitsPtr
typedef enum _Parity Parity
typedef enum _Parity * ParityPtr
typedef struct _SerRefStruc * pSerRefStruc
typedef struct _SerialMutexes SerialMutexes
typedef struct _SerialMutexes * SerialMutexesPtr
typedef struct _SerRefStruc SerRefStruc
typedef enum _StopBits StopBits
typedef enum _StopBits * StopBitsPtr

Enumeration Type Documentation

enum _DataBits
Enumerator
DataBits_5 
DataBits_6 
DataBits_7 
DataBits_8 
47 {
48  DataBits_5 = 0,
49  DataBits_6,
50  DataBits_7,
52 
enum _DataBits * DataBitsPtr
Definition: BFSerial.h:48
Definition: BFSerial.h:51
enum _DataBits DataBits
Definition: BFSerial.h:50
Definition: BFSerial.h:49
enum _Parity
Enumerator
ParityEven 
ParityOdd 
ParityNone 
56 {
57  ParityEven = 0,
58  ParityOdd,
59  ParityNone,
60 
61 } Parity, *ParityPtr;
Definition: BFSerial.h:59
enum _Parity Parity
Definition: BFSerial.h:57
Definition: BFSerial.h:58
enum _Parity * ParityPtr
enum _StopBits
Enumerator
StopBits_1 
StopBits_15 
StopBits_2 
64 {
65  StopBits_1 = 0,
67  StopBits_2,
68 
enum _StopBits * StopBitsPtr
Definition: BFSerial.h:67
Definition: BFSerial.h:66
Definition: BFSerial.h:65
enum _StopBits StopBits

Function Documentation

BFSERIALEXPORT BFRC BFSERIALCC BFSVersion ( PBFU32  pMajorVersion,
PBFU32  pMinorVersion 
)
BFSERIALEXPORT int BFSERIALCC clBFGetBaudRate ( void *  serBFRef,
unsigned int *  baudRate 
)
BFSERIALEXPORT int BFSERIALCC clBFGetSerialRef ( unsigned int  portNum,
void **  serBFRefPtr 
)
BFSERIALEXPORT int BFSERIALCC clBFGetSerialRefFromBoardHandle ( Bd  hBoard,
void **  serBFRefPtr 
)
BFSERIALEXPORT int BFSERIALCC clBFSerialCancelRead ( void *  serBFRef)
BFSERIALEXPORT int BFSERIALCC clBFSerialInitFromBoardHandle ( Bd  hBoard,
void **  serialRefPtr 
)
BFSERIALEXPORT int BFSERIALCC clBFSerialRead ( void *  serBFRef,
char *  buffer,
unsigned int *  bufferSize 
)
BFSERIALEXPORT int BFSERIALCC clBFSerialSettings ( void *  serBFRef,
unsigned int  baudRate,
unsigned int  dataBits,
unsigned int  parity,
unsigned int  stopBits 
)