These components implement the interfaces between physical host-device and physical reader-device.
More...
|
| phStatus_t | phbalReg_GetPortList (void *pDataParams, uint16_t wPortBufSize, uint8_t *pPortNames, uint16_t *pNumOfPorts) |
| | List all available ports. More...
|
| |
| phStatus_t | phbalReg_SetPort (void *pDataParams, uint8_t *pPortName) |
| | Select port to be used. More...
|
| |
| phStatus_t | phbalReg_OpenPort (void *pDataParams) |
| | Open communication port. More...
|
| |
| phStatus_t | phbalReg_ClosePort (void *pDataParams) |
| | Close communication port. More...
|
| |
| phStatus_t | phbalReg_Exchange (void *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength, uint16_t wRxBufSize, uint8_t *pRxBuffer, uint16_t *pRxLength) |
| | Perform data exchange on the bus. More...
|
| |
| phStatus_t | phbalReg_SetConfig (void *pDataParams, uint16_t wConfig, uint16_t wValue) |
| | Set configuration parameter. More...
|
| |
| phStatus_t | phbalReg_GetConfig (void *pDataParams, uint16_t wConfig, uint16_t *pValue) |
| | Get configuration parameter. More...
|
| |
These components implement the interfaces between physical host-device and physical reader-device.
§ PHBAL_REG_CONFIG_WRITE_TIMEOUT_MS
| #define PHBAL_REG_CONFIG_WRITE_TIMEOUT_MS 0x0000U |
Configure transmission timeout in milliseconds.
§ PHBAL_REG_CONFIG_READ_TIMEOUT_MS
| #define PHBAL_REG_CONFIG_READ_TIMEOUT_MS 0x0001U |
Configure reception timeout in milliseconds.
§ PHBAL_REG_TYPE_SPI
| #define PHBAL_REG_TYPE_SPI 0x0001U |
Configure transmission timeout in milliseconds.
§ PHBAL_REG_TYPE_I2C
| #define PHBAL_REG_TYPE_I2C 0x0002U |
Configure reception timeout in milliseconds.
§ PHBAL_REG_TYPE_SERIAL_WIN
| #define PHBAL_REG_TYPE_SERIAL_WIN 0x0003U |
Configure reception timeout in milliseconds.
§ phbalReg_GetPortList()
| phStatus_t phbalReg_GetPortList |
( |
void * |
pDataParams, |
|
|
uint16_t |
wPortBufSize, |
|
|
uint8_t * |
pPortNames, |
|
|
uint16_t * |
pNumOfPorts |
|
) |
| |
List all available ports.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | Pointer to this layer's parameter structure. |
| [in] | wPortBufSize | Buffer Size of Port Name String. |
| [out] | pPortNames | Port Name as Multi-String. |
| [out] | pNumOfPorts | Number of found port strings. |
§ phbalReg_SetPort()
| phStatus_t phbalReg_SetPort |
( |
void * |
pDataParams, |
|
|
uint8_t * |
pPortName |
|
) |
| |
Select port to be used.
Example SerialWin: The caller has to ensure that pPortName is valid throughout the whole lifetime of pDataParams.
Furthermore, the caller is responsible for prepending "\\.\" if COM ports above COM9 need to be accessed.
Example:
strcpy(pPortName, "COM9"); <-- correct
strcpy(pPortName, "\\\\.\\COM9"); <-- correct
strcpy(pPortName, "\\\\.\\COM10"); <-- correct
strcpy(pPortName, "COM10"); <-- wrong
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | Pointer to this layer's parameter structure. |
| [in] | pPortName | Port Name as String. |
§ phbalReg_OpenPort()
| phStatus_t phbalReg_OpenPort |
( |
void * |
pDataParams | ) |
|
Open communication port.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | Pointer to this layer's parameter structure. |
§ phbalReg_ClosePort()
| phStatus_t phbalReg_ClosePort |
( |
void * |
pDataParams | ) |
|
Close communication port.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | Pointer to this layer's parameter structure. |
§ phbalReg_Exchange()
Perform data exchange on the bus.
This API is used for command exchange between front-end CLIF and HOST. SPI : This API will also perform required flow control for particular front-end.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | Pointer to this layer's parameter structure. |
| [in] | wOption | Option parameter. |
| [in] | pTxBuffer | Data to transmit. |
| [in] | wTxLength | Number of bytes to transmit. |
| [in] | wRxBufSize | Size of receive buffer / Number of bytes to receive (depending on implementation). |
| [out] | pRxBuffer | Received data. |
| [out] | pRxLength | Number of received data bytes. |
§ phbalReg_SetConfig()
| phStatus_t phbalReg_SetConfig |
( |
void * |
pDataParams, |
|
|
uint16_t |
wConfig, |
|
|
uint16_t |
wValue |
|
) |
| |
Set configuration parameter.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | Pointer to this layer's parameter structure. |
| [in] | wConfig | Configuration identifier. |
| [in] | wValue | Configuration value. |
§ phbalReg_GetConfig()
| phStatus_t phbalReg_GetConfig |
( |
void * |
pDataParams, |
|
|
uint16_t |
wConfig, |
|
|
uint16_t * |
pValue |
|
) |
| |
Get configuration parameter.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | Pointer to this layer's parameter structure. |
| [in] | wConfig | Configuration identifier. |
| [out] | pValue | Configuration value. |