Contains Communication-Independent implementations of various hardwares.
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...
|
| |
Contains Communication-Independent implementations of various hardwares.
These Components implement the interfaces between physical Host-Device and physical Reader-Device.
◆ phbalReg_GetPortList()
List all available ports.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wPortBufSize | [In] Buffer Size of Port Name String. |
| [out] | pPortNames | [Out] Port Name as Multi-String. |
| [out] | pNumOfPorts | [Out] Number of found port strings. |
◆ phbalReg_SetPort()
Select Port to be used.
- Note
- The caller has to ensure that
pPortName is valid throughout the whole lifetime of pDataParams.
Furthermore, the caller is responsible for prepending \\.\ escape format 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 | [In] Pointer to this layer's parameter structure. |
| [in] | pPortName | [In] Port Name as String. |
◆ phbalReg_OpenPort()
| phStatus_t phbalReg_OpenPort |
( |
void * |
pDataParams | ) |
|
Open communication port.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] 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 | [In] Pointer to this layer's parameter structure. |
◆ phbalReg_Exchange()
Perform Data Exchange on the bus.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wOption | [In] Option parameter. |
| [in] | pTxBuffer | [In] Data to transmit. |
| [in] | wTxLength | [In] Number of bytes to transmit. |
| [in] | wRxBufSize | [In] Size of receive buffer / Number of bytes to receive (depending on implementation). |
| [out] | pRxBuffer | [Out] Received data. |
| [out] | pRxLength | [Out] Number of received data bytes. |
◆ phbalReg_SetConfig()
Set configuration parameter.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wConfig | [In] Configuration Identifier. |
| [in] | wValue | [In] Configuration Value. |
◆ phbalReg_GetConfig()
Get configuration parameter.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wConfig | [In] Configuration Identifier. |
| [out] | pValue | [Out] Configuration Value. |