![]() |
nrfxlib API 3.3.99
|
| int32_t(* mpsl_fem_twi_if_t::p_xfer_write_async) (void *p_instance, uint8_t slave_address, const uint8_t *p_data, uint8_t data_length, mpsl_fem_twi_async_xfer_write_cb_t p_callback, void *p_context) |
Pointer to a function starting an asynchronous write transfer on a TWI bus.
This function may be called only when exclusive access to the TWI bus is granted. This must be ensured externally.
The function pointed by this pointer may be called from any interrupt priority, including those related to MPSL timeslot signalling.
| p_instance | Pointer to object representing TWI instance. The value of p_instance field is put here. The meaning is fully up to the implementation of the function. |
| slave_address | Address of the slave device on TWI bus. |
| p_data | Pointer to a buffer containing data to be written. In case of successful call the caller is responsible for holding the buffer pointed by p_data until p_callback is called. |
| data_length | Length of buffer pointed by p_data. The number of bytes to write. |
| p_callback | Pointer to a callback function that will be called when the TWI transfer is finished. This callback informs about the result of the operation. It is called from an ISR of the TWI peripheral. |
| p_context | Pointer to a context that the p_callback will be notified with. |
| 0 | In case of success. The TWI transfer is being performed. It will end with a call to p_callback |
| other | Failure of TWI transfer initialization. The p_callback will not be called. |