NXP DAL
v05.02.00
|
Data Structures | |
struct | phbalReg_Type_t |
BAL type structure. More... | |
Functions | |
phStatus_t | phbalReg_Init (void *pDataParams, uint16_t wSizeOfDataParams) |
Initialize the BAL. 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 Transmit/Receive/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... | |
Generic BAL configuration parameters | |
#define | PHBAL_REG_CONFIG_WRITE_TIMEOUT_MS 0x0000U |
Configure transmission timeout in milliseconds. More... | |
#define | PHBAL_REG_CONFIG_READ_TIMEOUT_MS 0x0001U |
Configure reception timeout in milliseconds. More... | |
BAL types | |
#define | PHBAL_REG_TYPE_SPI 0x0001U |
SPI communication channel. More... | |
#define | PHBAL_REG_TYPE_I2C 0x0002U |
I2C communication channel. More... | |
#define | PHBAL_REG_TYPE_SERIAL_WIN 0x0003U |
SerialWin communication channel. More... | |
#define | PHBAL_REG_TYPE_KERNEL_SPI 0x0004U |
Linux kernel space SPI communication channel. More... | |
#define | PHBAL_REG_TYPE_USER_SPI 0x0005U |
Linux user space SPI communication channel. More... | |
#define PHBAL_REG_CONFIG_WRITE_TIMEOUT_MS 0x0000U |
Configure transmission timeout in milliseconds.
#define PHBAL_REG_CONFIG_READ_TIMEOUT_MS 0x0001U |
Configure reception timeout in milliseconds.
#define PHBAL_REG_TYPE_SPI 0x0001U |
SPI communication channel.
#define PHBAL_REG_TYPE_I2C 0x0002U |
I2C communication channel.
#define PHBAL_REG_TYPE_SERIAL_WIN 0x0003U |
SerialWin communication channel.
#define PHBAL_REG_TYPE_KERNEL_SPI 0x0004U |
Linux kernel space SPI communication channel.
#define PHBAL_REG_TYPE_USER_SPI 0x0005U |
Linux user space SPI communication channel.
phStatus_t phbalReg_Init | ( | void * | pDataParams, |
uint16_t | wSizeOfDataParams | ||
) |
Initialize the BAL.
PH_DRIVER_SUCCESS | Operation successful. |
PH_DRIVER_ERROR | Parameter structure size is invalid. |
[in] | pDataParams | Pointer to this layer's parameter structure phbalReg_Type_t. |
[in] | wSizeOfDataParams | Size of this layer's parameter structure. |
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 Transmit/Receive/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 (Hardware specific).
PH_DRIVER_SUCCESS | Operation successful. |
PH_DRIVER_ERROR | wOption is invalid or Response is too big for either given receive buffer or internal buffer. |
PH_DRIVER_TIMEOUT | No response received within given time frame. |
PH_DRIVER_FAILURE | Communication error. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | wOption | Option parameter, for future use. |
[in] | pTxBuffer | Data to transmit. |
[in] | wTxLength | Number of bytes to transmit, if 0 Tx is not performed. |
[in] | wRxBufSize | Size of receive buffer / Number of bytes to receive (depending on implementation). If 0 Rx is not performed. |
[out] | pRxBuffer | Received data. |
[out] | pRxLength | Number of received data bytes. |
phStatus_t phbalReg_SetConfig | ( | void * | pDataParams, |
uint16_t | wConfig, | ||
uint16_t | wValue | ||
) |
Set configuration parameter.
PH_DRIVER_SUCCESS | Operation successful. |
PH_DRIVER_ERROR | Parameter/Configuration is not supported or invalid. |
PH_DRIVER_FAILURE | Communication error. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | wConfig | Configuration identifier, for future use. |
[in] | wValue | Configuration value. |
phStatus_t phbalReg_GetConfig | ( | void * | pDataParams, |
uint16_t | wConfig, | ||
uint16_t * | pValue | ||
) |
Get configuration parameter.
PH_DRIVER_SUCCESS | Operation successful. |
PH_DRIVER_ERROR | Configuration is not supported or invalid. |
PH_DRIVER_FAILURE | Communication error. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | wConfig | Configuration identifier, for future use. |
[out] | pValue | Configuration value. |