NXP Reader Library  v17.1.0.2535
Component : RS232 (Windows)

RS232 BAL (Windows) More...

Collaboration diagram for Component : RS232 (Windows):

Data Structures

struct  phbalReg_SerialWin_DataParams_t
 Serial (Windows) BAL parameter structure. More...
 

Macros

#define PHBAL_REG_SERIALWIN_ID   0x01U
 ID for Serial BAL component (Win32)
 

Functions

phStatus_t phbalReg_SerialWin_Init (phbalReg_SerialWin_DataParams_t *pDataParams, uint16_t wSizeOfDataParams, uint16_t wEnumBufSize, uint8_t *pEnumBuffer)
 Initialise the RS232 BAL component. More...
 

BAL Communication Configs

#define PHBAL_REG_SERIALWIN_CONFIG_BITRATE   (PH_CONFIG_CUSTOM_BEGIN + 0)
 Configure communication speed.
 
#define PHBAL_REG_SERIALWIN_CONFIG_STOPBITS   (PH_CONFIG_CUSTOM_BEGIN + 1)
 Configure number of stop bits.
 
#define PHBAL_REG_SERIALWIN_CONFIG_DTR   (PH_CONFIG_CUSTOM_BEGIN + 2)
 Configure dtr line.
 
#define PHBAL_REG_SERIALWIN_CONFIG_RTS   (PH_CONFIG_CUSTOM_BEGIN + 3)
 Configure rts line.
 
#define PHBAL_REG_SERIALWIN_CONFIG_PARITY   (PH_CONFIG_CUSTOM_BEGIN + 4)
 Configure parity.
 
#define PHBAL_REG_SERIALWIN_CONFIG_FI   (PH_CONFIG_CUSTOM_BEGIN + 7)
 Configure FI.
 
#define PHBAL_REG_SERIALWIN_CONFIG_DI   (PH_CONFIG_CUSTOM_BEGIN + 8)
 Configure DI.
 
#define PHBAL_REG_SERIALWIN_CONFIG_TIMEOUT_MULTIPLIER_MS   (PH_CONFIG_CUSTOM_BEGIN + 9)
 Configure Timeout Multiplier.
 
#define PHBAL_REG_SERIALWIN_CONFIG_ADDITIONAL_RXDELAY_BYTES   (PH_CONFIG_CUSTOM_BEGIN + 10)
 Needed because WriteFile() sometimes returns too early.
 
#define PHBAL_REG_PCSCWIN_CONFIG_PROTOCOL   (PH_CONFIG_CUSTOM_BEGIN + 0)
 Used Protocol; e.g. More...
 
#define PHBAL_REG_PCSCWIN_CONFIG_SHARE   (PH_CONFIG_CUSTOM_BEGIN + 1)
 Used Access mode; e.g. More...
 
#define PHBAL_REG_PCSCWIN_CONFIG_USE_WARM_ATR   (PH_CONFIG_CUSTOM_BEGIN + 2)
 Define if the warm atr should used. More...
 
#define PHBAL_REG_PCSCWIN_CONFIG_CARD_STATE   (PH_CONFIG_CUSTOM_BEGIN + 3)
 Current state of the smart card in the reader. More...
 
#define PHBAL_REG_PCSCWIN_CONFIG_ACTIVE_PROTOCOL   (PH_CONFIG_CUSTOM_BEGIN + 4)
 Get the used Protocol; e.g. More...
 
#define PHBAL_REG_PCSCWIN_CONFIG_PEGODA2_MODE   (PH_CONFIG_CUSTOM_BEGIN + 5)
 Define if the Pegoda 2 Mode should used. More...
 

Option to supress checks after ReadFile is called.

#define PHBAL_REG_SERIALWIN_SUPRESS_CHECKS   0x0080
 Option to supress checks after ReadFile is called. More...
 

BAL Configuration Values

#define PHBAL_REG_SERIALWIN_VALUE_BITRATE_9600   0x0000U
 Serial bitrate as 9600 kBit/s.
 
#define PHBAL_REG_SERIALWIN_VALUE_BITRATE_19200   0x0001U
 Serial bitrate as 19200 kBit/s.
 
#define PHBAL_REG_SERIALWIN_VALUE_BITRATE_38400   0x0002U
 Serial bitrate as 38400 kBit/s.
 
#define PHBAL_REG_SERIALWIN_VALUE_BITRATE_57600   0x0003U
 Serial bitrate as 57600 kBit/s.
 
#define PHBAL_REG_SERIALWIN_VALUE_BITRATE_115200   0x0004U
 Serial bitrate as 115200 kBit/s.
 
#define PHBAL_REG_SERIALWIN_VALUE_BITRATE_230400   0x0005U
 Serial bitrate as 230400 kBit/s.
 
#define PHBAL_REG_SERIALWIN_VALUE_BITRATE_460800   0x0006U
 Serial bitrate as 460800 kBit/s.
 
#define PHBAL_REG_SERIALWIN_VALUE_STOPBITS_ONE   0x0000U
 One stopbit.
 
#define PHBAL_REG_SERIALWIN_VALUE_STOPBITS_ONE5   0x0001U
 One and a half stopbit.
 
#define PHBAL_REG_SERIALWIN_VALUE_STOPBITS_TWO   0x0002U
 Two stopbit.
 
#define PHBAL_REG_SERIALWIN_VALUE_DTR_LOW   0x0000U
 DTR Signal low.
 
#define PHBAL_REG_SERIALWIN_VALUE_DTR_HIGH   0x0001U
 DTR Signal high.
 
#define PHBAL_REG_SERIALWIN_VALUE_RTS_LOW   0x0000U
 RTS Signal low.
 
#define PHBAL_REG_SERIALWIN_VALUE_RTS_HIGH   0x0001U
 RTS Signal high.
 
#define PHBAL_REG_SERIALWIN_VALUE_PARITY_NONE   0x0000U
 Parity as None.
 
#define PHBAL_REG_SERIALWIN_VALUE_PARITY_ODD   0x0001U
 Parity as ODD.
 
#define PHBAL_REG_SERIALWIN_VALUE_PARITY_EVEN   0x0002U
 Parity as EVEN.
 

Detailed Description

RS232 BAL (Windows)

Serial-Line (COM-Port) interface for Windows.

Macro Definition Documentation

◆ PHBAL_REG_SERIALWIN_SUPRESS_CHECKS

#define PHBAL_REG_SERIALWIN_SUPRESS_CHECKS   0x0080

Option to supress checks after ReadFile is called.


◆ PHBAL_REG_PCSCWIN_CONFIG_PROTOCOL

#define PHBAL_REG_PCSCWIN_CONFIG_PROTOCOL   (PH_CONFIG_CUSTOM_BEGIN + 0)

◆ PHBAL_REG_PCSCWIN_CONFIG_SHARE

#define PHBAL_REG_PCSCWIN_CONFIG_SHARE   (PH_CONFIG_CUSTOM_BEGIN + 1)

Used Access mode; e.g.

PHBAL_REG_PCSCWIN_VALUE_SHARE_SHARED.

◆ PHBAL_REG_PCSCWIN_CONFIG_USE_WARM_ATR

#define PHBAL_REG_PCSCWIN_CONFIG_USE_WARM_ATR   (PH_CONFIG_CUSTOM_BEGIN + 2)

Define if the warm atr should used.

Values: PH_ON, PH_OFF.

◆ PHBAL_REG_PCSCWIN_CONFIG_CARD_STATE

#define PHBAL_REG_PCSCWIN_CONFIG_CARD_STATE   (PH_CONFIG_CUSTOM_BEGIN + 3)

Current state of the smart card in the reader.

See SCardStatus

◆ PHBAL_REG_PCSCWIN_CONFIG_ACTIVE_PROTOCOL

#define PHBAL_REG_PCSCWIN_CONFIG_ACTIVE_PROTOCOL   (PH_CONFIG_CUSTOM_BEGIN + 4)

Get the used Protocol; e.g.

PHBAL_REG_PCSCWIN_VALUE_PROTOCOL_T0.

◆ PHBAL_REG_PCSCWIN_CONFIG_PEGODA2_MODE

#define PHBAL_REG_PCSCWIN_CONFIG_PEGODA2_MODE   (PH_CONFIG_CUSTOM_BEGIN + 5)

Define if the Pegoda 2 Mode should used.

Values: PH_ON, PH_OFF.

Function Documentation

◆ phbalReg_SerialWin_Init()

phStatus_t phbalReg_SerialWin_Init ( phbalReg_SerialWin_DataParams_t pDataParams,
uint16_t  wSizeOfDataParams,
uint16_t  wEnumBufSize,
uint8_t pEnumBuffer 
)

Initialise the RS232 BAL component.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSParameter structure size is invalid.
PH_ERR_INVALID_PARAMETERwEnumBufSize is invalid.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wSizeOfDataParams[In] Specifies the size of the data parameter structure.
[in]wEnumBufSize[In] Size of the enumeration buffer. Maximum possible size is 255 bytes.
[in]pEnumBuffer[In] Pointer to the enumeration buffer for the GetPortList() function.