xfer function
QNX SDP8.0Customizing a BSPConfigurationDeveloper
The xfer function performs a single or multi-phase I2C master transfer, which includes sending and/or receiving data. The prototype for this function is:
i2c_status_t xfer(
void *const hdl,
void *const send_buf,
const uint32_t send_len,
void *const recv_buf,
const uint32_t recv_len );
The arguments are:
- hdl
- The handle returned by the init function.
- send_buf
- A pointer to the buffer of data to send.
- send_len
- The length, in bytes, of the data to send.
- recv_buf
- A pointer to the buffer in which to put the received data.
- recv_len
- The length, in bytes, of the receive buffer.
The function returns one of the following:
- I2C_STATUS_DONE
- The transaction completed (with or without an error).
- I2C_STATUS_ERROR
- An unknown error occurred.
- I2C_STATUS_NACK
- Slave no-acknowledgement.
- I2C_STATUS_ARBL
- Lost arbitration.
- I2C_STATUS_BUSY
- The transaction timed out.
- I2C_STATUS_ABORT
- The transaction was aborted.
Page updated:
