1 /* 2 * i2c_msg.h 3 * 4 * i2c message utils 5 * 6 * Copyright (c) 2023 Huawei Device Co., Ltd. 7 * 8 * HDF is dual licensed: you can use it either under the terms of 9 * the GPL, or the BSD license, at your option. 10 * See the LICENSE file in the root of this repository for complete details. 11 */ 12 #ifndef HDF_I2C_MSG_H 13 #define HDF_I2C_MSG_H 14 15 #include "i2c_core.h" 16 17 int32_t I2cMsgsRebuildFromSbuf(struct HdfSBuf *data, struct I2cMsg **msgs, int16_t *count); 18 19 void I2cMsgsFree(struct I2cMsg *msgs, int16_t count); 20 21 int32_t I2cMsgsWriteToSbuf(struct I2cMsg *msgs, int16_t count, struct HdfSBuf *reply); 22 23 #endif // HDF_I2C_MSG_H 24