Home
last modified time | relevance | path

Searched refs:msgs (Results 1 - 25 of 32) sorted by relevance

12

/drivers/hdf_core/framework/support/platform/src/i2c/
H A Di2c_msg.c17 int32_t AssignReplayBuffer(uint32_t lenReply, uint8_t **bufReply, struct I2cMsg *msgs, int16_t count) in AssignReplayBuffer() argument
28 if ((msgs[i].flags & I2C_FLAG_READ) != 0) { in AssignReplayBuffer()
29 msgs[i].buf = buf; in AssignReplayBuffer()
30 buf += msgs[i].len; in AssignReplayBuffer()
44 struct I2cMsg *msgs = NULL; in RebuildMsgs() local
48 msgs = OsalMemCalloc(msgSize + sizeof(void *)); in RebuildMsgs()
49 if (msgs == NULL) { in RebuildMsgs()
50 HDF_LOGE("RebuildMsgs: memCalloc for msgs fail!"); in RebuildMsgs()
53 bufReply = (uint8_t **)((uint8_t *)msgs + msgSize); in RebuildMsgs()
59 OsalMemFree(msgs); in RebuildMsgs()
86 I2cMsgsRebuildFromSbuf(struct HdfSBuf *data, struct I2cMsg **msgs, int16_t *count) I2cMsgsRebuildFromSbuf() argument
109 I2cMsgsWriteToSbuf(struct I2cMsg *msgs, int16_t count, struct HdfSBuf *reply) I2cMsgsWriteToSbuf() argument
125 I2cMsgsFree(struct I2cMsg *msgs, int16_t count) I2cMsgsFree() argument
[all...]
H A Di2c_if_u.c210 static int32_t WriteI2cMsgs(struct HdfSBuf *data, struct I2cMsg *msgs, int16_t count) in WriteI2cMsgs() argument
221 userMsgs.addr = msgs[i].addr; in WriteI2cMsgs()
222 userMsgs.len = msgs[i].len; in WriteI2cMsgs()
223 userMsgs.flags = msgs[i].flags; in WriteI2cMsgs()
229 if (msgs[i].len > I2C_BUFF_SIZE || in WriteI2cMsgs()
230 ((msgs[i].flags & I2C_FLAG_READ) && (msgs[i].len + sizeof(uint64_t) > I2C_BUFF_SIZE))) { in WriteI2cMsgs()
231 HDF_LOGE("WriteI2cMsgs: msg data size %{public}u out of range!", msgs[i].len); in WriteI2cMsgs()
235 if (!HdfSbufWriteBuffer(data, (uint8_t *)msgs[i].buf, msgs[ in WriteI2cMsgs()
271 ReadI2cMsgs(struct HdfSBuf *reply, struct I2cMsg *msgs, int16_t count) ReadI2cMsgs() argument
288 I2cServiceTransfer(DevHandle handle, struct I2cMsg *msgs, int16_t count) I2cServiceTransfer() argument
333 I2cTransfer(DevHandle handle, struct I2cMsg *msgs, int16_t count) I2cTransfer() argument
[all...]
H A Di2c_if.c33 int32_t I2cTransfer(DevHandle handle, struct I2cMsg *msgs, int16_t count) in I2cTransfer() argument
40 if (msgs == NULL || count <= 0) { in I2cTransfer()
41 HDF_LOGE("I2cTransfer: err params! msgs:%s, count:%hd!", (msgs == NULL) ? "0" : "x", count); in I2cTransfer()
45 return I2cCntlrTransfer((struct I2cCntlr *)handle, msgs, count); in I2cTransfer()
H A Di2c_core.c209 int32_t I2cCntlrTransfer(struct I2cCntlr *cntlr, struct I2cMsg *msgs, int16_t count) in I2cCntlrTransfer() argument
227 ret = cntlr->ops->transfer(cntlr, msgs, count); in I2cCntlrTransfer()
235 struct I2cMsg *msgs = NULL; in I2cIoDoTransfer() local
240 if (I2cMsgsRebuildFromSbuf(data, &msgs, &count) != HDF_SUCCESS) { in I2cIoDoTransfer()
245 transCnt = I2cCntlrTransfer(cntlr, msgs, count); in I2cIoDoTransfer()
247 I2cMsgsFree(msgs, count); in I2cIoDoTransfer()
252 if (I2cMsgsWriteToSbuf(msgs, count, reply) != HDF_SUCCESS) { in I2cIoDoTransfer()
256 I2cMsgsFree(msgs, count); in I2cIoDoTransfer()
/drivers/hdf_core/framework/support/platform/src/i3c/
H A Di3c_if.c25 int32_t I3cTransfer(DevHandle handle, struct I3cMsg *msgs, int16_t count, enum TransMode mode) in I3cTransfer() argument
34 if (msgs == NULL || count <= 0) { in I3cTransfer()
35 HDF_LOGE("I3cTransfer: err params! msgs:%s, count:%hd", (msgs == NULL) ? "0" : "x", count); in I3cTransfer()
41 ret = I3cCntlrI2cTransfer((struct I3cCntlr *)handle, msgs, count); in I3cTransfer()
44 ret = I3cCntlrTransfer((struct I3cCntlr *)handle, msgs, count); in I3cTransfer()
47 ret = I3cCntlrSendCccCmd((struct I3cCntlr *)handle, msgs->ccc); in I3cTransfer()
/drivers/hdf_core/framework/support/platform/src/spi/
H A Dspi_core.c140 struct HdfSBuf *data, uint32_t count, uint8_t *tmpFlag, struct SpiMsg *msgs, uint32_t *lenReply) in SpiMsgsRwProcess()
155 msgs[i].len = userMsg->len; in SpiMsgsRwProcess()
156 msgs[i].speed = userMsg->speed; in SpiMsgsRwProcess()
157 msgs[i].delayUs = userMsg->delayUs; in SpiMsgsRwProcess()
158 msgs[i].keepCs = userMsg->keepCs; in SpiMsgsRwProcess()
159 msgs[i].rbuf = NULL; in SpiMsgsRwProcess()
160 msgs[i].wbuf = NULL; in SpiMsgsRwProcess()
162 (*lenReply) += msgs[i].len; in SpiMsgsRwProcess()
163 msgs[i].rbuf = tmpFlag; // tmpFlag is not mainpulated, only to mark rbuf not NULL in SpiMsgsRwProcess()
166 if ((!HdfSbufReadBuffer(data, (const void **)&buf, &len)) || (buf == NULL) || (len != msgs[ in SpiMsgsRwProcess()
139 SpiMsgsRwProcess( struct HdfSBuf *data, uint32_t count, uint8_t *tmpFlag, struct SpiMsg *msgs, uint32_t *lenReply) SpiMsgsRwProcess() argument
192 struct SpiMsg *msgs = NULL; SpiTransferRebuildMsgs() local
231 SpiTransferWriteBackMsgs(struct HdfSBuf *reply, struct SpiMsg *msgs, uint32_t count) SpiTransferWriteBackMsgs() argument
253 struct SpiMsg *msgs = NULL; SpiIoTransfer() local
[all...]
H A Dspi_if_u.c55 static int32_t SpiMsgWriteArray(struct HdfSBuf *data, struct SpiMsg *msgs, uint32_t count, struct HdfSBuf **reply) in SpiMsgWriteArray() argument
63 if (msgs[i].rbuf != NULL) { in SpiMsgWriteArray()
65 replyLen += msgs[i].len + sizeof(uint64_t); in SpiMsgWriteArray()
66 rbufLen += msgs[i].len; in SpiMsgWriteArray()
68 if (msgs[i].wbuf != NULL) { in SpiMsgWriteArray()
71 userMsg.len = msgs[i].len; in SpiMsgWriteArray()
72 userMsg.speed = msgs[i].speed; in SpiMsgWriteArray()
73 userMsg.delayUs = msgs[i].delayUs; in SpiMsgWriteArray()
74 userMsg.keepCs = msgs[i].keepCs; in SpiMsgWriteArray()
81 if (msgs[ in SpiMsgWriteArray()
126 SpiMsgReadArray(struct HdfSBuf *reply, struct SpiMsg *msgs, uint32_t count) SpiMsgReadArray() argument
144 SpiTransfer(DevHandle handle, struct SpiMsg *msgs, uint32_t count) SpiTransfer() argument
[all...]
H A Dspi_if.c39 int32_t SpiTransfer(DevHandle handle, struct SpiMsg *msgs, uint32_t count) in SpiTransfer() argument
48 return SpiCntlrTransfer(client->cntlr, client->csNum, msgs, count); in SpiTransfer()
/drivers/hdf_core/adapter/khdf/linux/platform/i2c/
H A Di2c_adapter.c28 static struct i2c_msg *CreateLinuxI2cMsgs(struct I2cMsg *msgs, int16_t count) in CreateLinuxI2cMsgs() argument
35 HDF_LOGE("CreateLinuxI2cMsgs: malloc linux msgs fail!"); in CreateLinuxI2cMsgs()
40 linuxMsgs[i].addr = msgs[i].addr; in CreateLinuxI2cMsgs()
41 linuxMsgs[i].buf = msgs[i].buf; in CreateLinuxI2cMsgs()
42 linuxMsgs[i].len = msgs[i].len; in CreateLinuxI2cMsgs()
43 linuxMsgs[i].flags = msgs[i].flags; in CreateLinuxI2cMsgs()
48 static inline void FreeLinuxI2cMsgs(struct i2c_msg *msgs, int16_t count) in FreeLinuxI2cMsgs() argument
51 OsalMemFree(msgs); in FreeLinuxI2cMsgs()
54 static int32_t LinuxI2cTransfer(struct I2cCntlr *cntlr, struct I2cMsg *msgs, int16_t count) in LinuxI2cTransfer() argument
63 if (msgs in LinuxI2cTransfer()
[all...]
/drivers/hdf_core/framework/support/platform/include/i2c/
H A Di2c_msg.h17 int32_t I2cMsgsRebuildFromSbuf(struct HdfSBuf *data, struct I2cMsg **msgs, int16_t *count);
19 void I2cMsgsFree(struct I2cMsg *msgs, int16_t count);
21 int32_t I2cMsgsWriteToSbuf(struct I2cMsg *msgs, int16_t count, struct HdfSBuf *reply);
H A Di2c_core.h43 * @param msgs Indicates the {@link I2cMsg} message array.
51 int32_t (*transfer)(struct I2cCntlr *cntlr, struct I2cMsg *msgs, int16_t count);
116 * @param msgs Indicates the {@link I2cMsg} message array.
124 int32_t I2cCntlrTransfer(struct I2cCntlr *cntlr, struct I2cMsg *msgs, int16_t count);
/drivers/hdf_core/framework/model/audio/common/src/
H A Daudio_codec_base.c461 static void CodecI2cRelease(struct I2cMsg *msgs, int16_t msgSize, DevHandle i2cHandle) in CodecI2cRelease() argument
463 if (msgs != NULL) { in CodecI2cRelease()
464 if (msgSize == 0 && msgs->buf != NULL) { in CodecI2cRelease()
465 OsalMemFree(msgs->buf); in CodecI2cRelease()
466 msgs->buf = NULL; in CodecI2cRelease()
467 } else if (msgSize == 1 && msgs[0].buf != NULL) { in CodecI2cRelease()
468 OsalMemFree(msgs[0].buf); in CodecI2cRelease()
469 msgs[0].buf = NULL; in CodecI2cRelease()
471 if (msgs[0].buf != NULL) { in CodecI2cRelease()
472 OsalMemFree(msgs[ in CodecI2cRelease()
490 CodecI2cMsgFill(struct I2cTransferParam *i2cTransferParam, const struct AudioAddrConfig *regAttr, uint16_t rwFlag, uint8_t *regs, struct I2cMsg *msgs) CodecI2cMsgFill() argument
553 struct I2cMsg msgs[I2C_MSG_NUM]; CodecI2cTransfer() local
[all...]
/drivers/hdf_core/framework/test/unittest/platform/common/
H A Dspi_test.c275 struct SpiMsg msgs[SPI_TEST_MSG_NUM]; in SpiMultiTransferTest() local
280 msgs[SPI_TEST_MSG_0].rbuf = tester->config.rbuf; in SpiMultiTransferTest()
281 msgs[SPI_TEST_MSG_0].wbuf = tester->config.wbuf; in SpiMultiTransferTest()
282 msgs[SPI_TEST_MSG_0].len = tester->config.len; in SpiMultiTransferTest()
283 msgs[SPI_TEST_MSG_0].delayUs = 0; in SpiMultiTransferTest()
284 msgs[SPI_TEST_MSG_0].speed = 0; // use default speed in SpiMultiTransferTest()
286 msgs[SPI_TEST_MSG_1].wbuf = tester->config.wbuf; in SpiMultiTransferTest()
287 msgs[SPI_TEST_MSG_1].rbuf = NULL; in SpiMultiTransferTest()
288 msgs[SPI_TEST_MSG_1].len = tester->config.len; in SpiMultiTransferTest()
289 msgs[SPI_TEST_MSG_ in SpiMultiTransferTest()
[all...]
H A Dmipi_dsi_test.c18 test->msgs.dataType = 0x05; /* 0x05: data type */ in MipiDsiTestMallocBuf()
19 test->msgs.dataLen = 1; /* 1: data len */ in MipiDsiTestMallocBuf()
20 test->msgs.delay = 0; in MipiDsiTestMallocBuf()
21 test->msgs.payload = &buf; in MipiDsiTestMallocBuf()
108 ret = MipiDsiTx(test->handle, &test->msgs); in MipiDsiTxRxTest()
H A Dmipi_dsi_test.h28 struct DsiCmdDesc msgs; member
/drivers/hdf_core/adapter/khdf/linux/test/platform/i2c/
H A Di2c_adapter_dummy.c30 static int32_t EchoI2cMsgs(struct I2cMsg *msgs, int16_t count) in EchoI2cMsgs() argument
38 msg = msgs + i; in EchoI2cMsgs()
42 HDF_LOGE("%s: malloc linux msgs fail!", __func__); in EchoI2cMsgs()
55 static int32_t DummyI2cTransEcho(struct I2cCntlr *cntlr, struct I2cMsg *msgs, int16_t count) in DummyI2cTransEcho() argument
61 if (msgs == NULL || count <= 0) { in DummyI2cTransEcho()
66 return EchoI2cMsgs(msgs, count); in DummyI2cTransEcho()
/drivers/hdf_core/framework/test/unittest/platform/virtual/
H A Di3c_virtual.c35 struct I3cMsg *msgs; member
66 struct I3cMsg *msg = &td->msgs[td->index]; in VirtualI3cXferI2cOneMsgPolling()
88 static int32_t VirtualI3cTransfer(struct I3cCntlr *cntlr, struct I3cMsg *msgs, int16_t count) in VirtualI3cTransfer() argument
95 if (msgs == NULL || count <= 0) { in VirtualI3cTransfer()
103 static int32_t VirtualI3cCntlrI2cTransfer(struct I3cCntlr *cntlr, struct I3cMsg *msgs, int16_t count) in VirtualI3cCntlrI2cTransfer() argument
116 if (msgs == NULL || count <= 0) { in VirtualI3cCntlrI2cTransfer()
120 td.msgs = msgs; in VirtualI3cCntlrI2cTransfer()
/drivers/hdf_core/framework/include/audio/
H A Daudio_dsp_if.h112 * @brief Defines Dsp device msgs read.
115 * @param msgs Indicates transfer msgs data.
116 * @param len Indicates msgs length.
118 * @return Returns <b>0</b> if dsp device read msgs success; returns a non-zero value otherwise.
123 int32_t (*Read)(const struct DspDevice *dsp, const void *msgs, const uint32_t len);
126 * @brief Defines Dsp device msgs write.
129 * @param msgs Indicates transfer msgs data.
130 * @param len Indicates msgs lengt
[all...]
/drivers/hdf_core/adapter/platform/i2c/
H A Di2c_wm.c56 static int32_t i2cHostTransfer(struct I2cCntlr *cntlr, struct I2cMsg *msgs, int16_t count);
302 static int32_t i2c_transfer(struct I2cDevice *device, struct I2cMsg *msgs, int16_t count) in i2c_transfer() argument
307 if (device == NULL || msgs == NULL) { in i2c_transfer()
308 HDF_LOGE("%s: device or msgs is NULL\r\n", __func__); in i2c_transfer()
321 msg = &msgs[i]; in i2c_transfer()
328 static int32_t i2cHostTransfer(struct I2cCntlr *cntlr, struct I2cMsg *msgs, int16_t count) in i2cHostTransfer() argument
332 if (cntlr == NULL || msgs == NULL || cntlr->priv == NULL) { in i2cHostTransfer()
333 HDF_LOGE("%s: I2cCntlr or msgs is NULL\r\n", __func__); in i2cHostTransfer()
337 return i2c_transfer(device, msgs, count); in i2cHostTransfer()
H A Di2c_bes.c45 static int32_t i2cHostTransfer(struct I2cCntlr *cntlr, struct I2cMsg *msgs, int16_t count);
353 static int32_t i2c_transfer(struct I2cDevice *device, struct I2cMsg *msgs, int16_t count) in i2c_transfer() argument
359 if (device == NULL || msgs == NULL) { in i2c_transfer()
360 HDF_LOGE("%s: device or msgs is NULL\r\n", __func__); in i2c_transfer()
374 msg = &msgs[i]; in i2c_transfer()
384 msg2 = &msgs[i]; in i2c_transfer()
404 static int32_t i2cHostTransfer(struct I2cCntlr *cntlr, struct I2cMsg *msgs, int16_t count) in i2cHostTransfer() argument
408 if (cntlr == NULL || msgs == NULL || cntlr->priv == NULL) { in i2cHostTransfer()
409 HDF_LOGE("%s: I2cCntlr or msgs is NULL\r\n", __func__); in i2cHostTransfer()
413 return i2c_transfer(device, msgs, coun in i2cHostTransfer()
[all...]
H A Di2c_stm32f4xx.c51 static int32_t I2cDataTransfer(struct I2cCntlr *cntlr, struct I2cMsg *msgs, int16_t count);
169 static int32_t I2cDataTransfer(struct I2cCntlr *cntlr, struct I2cMsg *msgs, int16_t count) in I2cDataTransfer() argument
171 if (cntlr == NULL || msgs == NULL || cntlr->priv == NULL) { in I2cDataTransfer()
189 msg = &msgs[i]; in I2cDataTransfer()
/drivers/hdf_core/framework/support/platform/include/i3c/
H A Di3c_core.h127 * @param msgs Indicates the {@link I3cMsg} message array.
135 int32_t (*Transfer)(struct I3cCntlr *cntlr, struct I3cMsg *msgs, int16_t count);
141 * @param msgs Indicates the {@link I3cMsg} message array.
149 int32_t (*i2cTransfer)(struct I3cCntlr *cntlr, struct I3cMsg *msgs, int16_t count);
301 * @param msgs Indicates the {@link I3cMsg} message array.
309 int32_t I3cCntlrI2cTransfer(struct I3cCntlr *cntlr, struct I3cMsg *msgs, int16_t count);
315 * @param msgs Indicates the {@link I3cMsg} message array.
323 int32_t I3cCntlrTransfer(struct I3cCntlr *cntlr, struct I3cMsg *msgs, int16_t count);
/drivers/hdf_core/framework/support/platform/src/fwk/
H A Dplatform_queue.c34 if (DListIsEmpty(&queue->msgs)) { in PlatformQueueNextMsg()
35 PLAT_LOGE("PlatformQueueNextMsg: queue msgs is empty!"); in PlatformQueueNextMsg()
38 *msg = DLIST_FIRST_ENTRY(&queue->msgs, struct PlatformMsg, node); in PlatformQueueNextMsg()
88 DListHeadInit(&queue->msgs); in PlatformQueueCreate()
165 DListInsertTail(&msg->node, &queue->msgs); in PlatformQueueAddMsg()
/drivers/hdf_core/adapter/khdf/liteos/platform/include/
H A Di2c_dev.h73 struct i2c_msg *msgs; member
/drivers/hdf_core/framework/include/platform/
H A Di2c_if.h128 * @param msgs Indicates the pointer to the I2C transfer message structure array.
139 int32_t I2cTransfer(DevHandle handle, struct I2cMsg *msgs, int16_t count);

Completed in 12 milliseconds

12