1: int32_t AG903_I2CMgrSetCallback(
AG903_I2CMgrHandle* handle,
AG903_I2CMgrClbk clbk)
2: {
3: int32_t retval =
AG903_ENONE;
4: int32_t result;
5: uint32_t hdlnum;
6: uint8_t ch;
7:
8: result = I2CMgr_CheckHandle(handle, &ch, &hdlnum);
9:
if(
AG903_ENONE != result) {
10:
return -
AG903_EINVAL;
11: }
12:
13: I2cHandleStat[ch][hdlnum].clbk = clbk;
14:
15:
return retval;
16: }