+ async_req_ptr = malloc(sizeof(afb_req));
+ *async_req_ptr = request;
+
+ if (UCSI_I2CWrite( &ucsContextS->ucsiData, /*UCSI_Data_t *pPriv*/
+ node_addr, /*uint16_t targetAddress*/
+ false, /*bool isBurst*/
+ 0u, /* block count */
+ 0x2Au, /* i2c slave address */
+ 0x03E8u, /* timeout 1000 milliseconds */
+ tx_payload_sz, /* uint8_t dataLen */
+ &tx_payload[0], /* uint8_t *pData */
+ &ucs2_write_i2c_response, /* callback*/
+ (void*)async_req_ptr /* callback argument */
+ )) {
+ /* asynchronous command is running */
+ afb_req_addref(request);
+ }
+ else {
+ AFB_NOTICE("i2c_data: scheduling command failed");
+ afb_req_fail_f(request, "query-command-queue","command queue overload");
+ free(async_req_ptr);
+ async_req_ptr = NULL;
+ goto OnErrorExit;
+ }