Lines Matching refs:ui2c
35 uint32_t UI2C_Open(UI2C_T *ui2c, uint32_t u32BusClock) in UI2C_Open() argument
46 ui2c->CTL &= ~UI2C_CTL_FUNMODE_Msk; in UI2C_Open()
47 ui2c->CTL = 4U << UI2C_CTL_FUNMODE_Pos; in UI2C_Open()
51 ui2c->LINECTL &= ~UI2C_LINECTL_DWIDTH_Msk; in UI2C_Open()
52 ui2c->LINECTL |= 8U << UI2C_LINECTL_DWIDTH_Pos; in UI2C_Open()
55 ui2c->LINECTL &= ~UI2C_LINECTL_LSB_Msk; in UI2C_Open()
58 ui2c->BRGEN &= ~UI2C_BRGEN_CLKDIV_Msk; in UI2C_Open()
59 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_Open()
60 ui2c->PROTCTL |= UI2C_PROTCTL_PROTEN_Msk; in UI2C_Open()
74 void UI2C_Close(UI2C_T *ui2c) in UI2C_Close() argument
77 ui2c->CTL &= ~UI2C_CTL_FUNMODE_Msk; in UI2C_Close()
89 void UI2C_ClearTimeoutFlag(UI2C_T *ui2c) in UI2C_ClearTimeoutFlag() argument
91 ui2c->PROTSTS = UI2C_PROTSTS_TOIF_Msk; in UI2C_ClearTimeoutFlag()
107 void UI2C_Trigger(UI2C_T *ui2c, uint8_t u8Start, uint8_t u8Stop, uint8_t u8Ptrg, uint8_t u8Ack) in UI2C_Trigger() argument
110 …uint32_t u32Val = ui2c->PROTCTL & ~(UI2C_PROTCTL_STA_Msk | UI2C_PROTCTL_STO_Msk | UI2C_PROTCTL_AA_… in UI2C_Trigger()
129 ui2c->PROTCTL = u32Val | u32Reg; in UI2C_Trigger()
151 void UI2C_DisableInt(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_DisableInt() argument
156 ui2c->PROTIEN &= ~UI2C_PROTIEN_TOIEN_Msk; in UI2C_DisableInt()
162 ui2c->PROTIEN &= ~UI2C_PROTIEN_STARIEN_Msk; in UI2C_DisableInt()
168 ui2c->PROTIEN &= ~UI2C_PROTIEN_STORIEN_Msk; in UI2C_DisableInt()
174 ui2c->PROTIEN &= ~UI2C_PROTIEN_NACKIEN_Msk; in UI2C_DisableInt()
180 ui2c->PROTIEN &= ~UI2C_PROTIEN_ARBLOIEN_Msk; in UI2C_DisableInt()
186 ui2c->PROTIEN &= ~UI2C_PROTIEN_ERRIEN_Msk; in UI2C_DisableInt()
192 ui2c->PROTIEN &= ~UI2C_PROTIEN_ACKIEN_Msk; in UI2C_DisableInt()
213 void UI2C_EnableInt(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_EnableInt() argument
218 ui2c->PROTIEN |= UI2C_PROTIEN_TOIEN_Msk; in UI2C_EnableInt()
224 ui2c->PROTIEN |= UI2C_PROTIEN_STARIEN_Msk; in UI2C_EnableInt()
230 ui2c->PROTIEN |= UI2C_PROTIEN_STORIEN_Msk; in UI2C_EnableInt()
236 ui2c->PROTIEN |= UI2C_PROTIEN_NACKIEN_Msk; in UI2C_EnableInt()
242 ui2c->PROTIEN |= UI2C_PROTIEN_ARBLOIEN_Msk; in UI2C_EnableInt()
248 ui2c->PROTIEN |= UI2C_PROTIEN_ERRIEN_Msk; in UI2C_EnableInt()
254 ui2c->PROTIEN |= UI2C_PROTIEN_ACKIEN_Msk; in UI2C_EnableInt()
267 uint32_t UI2C_GetBusClockFreq(UI2C_T *ui2c) in UI2C_GetBusClockFreq() argument
273 u32Divider = (ui2c->BRGEN & UI2C_BRGEN_CLKDIV_Msk) >> UI2C_BRGEN_CLKDIV_Pos; in UI2C_GetBusClockFreq()
288 uint32_t UI2C_SetBusClockFreq(UI2C_T *ui2c, uint32_t u32BusClock) in UI2C_SetBusClockFreq() argument
297 ui2c->BRGEN &= ~UI2C_BRGEN_CLKDIV_Msk; in UI2C_SetBusClockFreq()
298 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_SetBusClockFreq()
322 uint32_t UI2C_GetIntFlag(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_GetIntFlag() argument
327 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_TOIF_Msk; in UI2C_GetIntFlag()
334 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_STARIF_Msk; in UI2C_GetIntFlag()
341 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_STORIF_Msk; in UI2C_GetIntFlag()
348 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_NACKIF_Msk; in UI2C_GetIntFlag()
355 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_ARBLOIF_Msk; in UI2C_GetIntFlag()
362 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_ERRIF_Msk; in UI2C_GetIntFlag()
369 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_ACKIF_Msk; in UI2C_GetIntFlag()
397 void UI2C_ClearIntFlag(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_ClearIntFlag() argument
402 ui2c->PROTSTS = UI2C_PROTSTS_TOIF_Msk; in UI2C_ClearIntFlag()
408 ui2c->PROTSTS = UI2C_PROTSTS_STARIF_Msk; in UI2C_ClearIntFlag()
414 ui2c->PROTSTS = UI2C_PROTSTS_STORIF_Msk; in UI2C_ClearIntFlag()
420 ui2c->PROTSTS = UI2C_PROTSTS_NACKIF_Msk; in UI2C_ClearIntFlag()
426 ui2c->PROTSTS = UI2C_PROTSTS_ARBLOIF_Msk; in UI2C_ClearIntFlag()
432 ui2c->PROTSTS = UI2C_PROTSTS_ERRIF_Msk; in UI2C_ClearIntFlag()
438 ui2c->PROTSTS = UI2C_PROTSTS_ACKIF_Msk; in UI2C_ClearIntFlag()
451 uint32_t UI2C_GetData(UI2C_T *ui2c) in UI2C_GetData() argument
453 return ( ui2c->RXDAT ); in UI2C_GetData()
466 void UI2C_SetData(UI2C_T *ui2c, uint8_t u8Data) in UI2C_SetData() argument
468 ui2c->TXDAT = u8Data; in UI2C_SetData()
485 void UI2C_SetSlaveAddr(UI2C_T *ui2c, uint8_t u8SlaveNo, uint16_t u16SlaveAddr, uint8_t u8GCMode) in UI2C_SetSlaveAddr() argument
489 ui2c->DEVADDR1 = u16SlaveAddr; in UI2C_SetSlaveAddr()
493 ui2c->DEVADDR0 = u16SlaveAddr; in UI2C_SetSlaveAddr()
496 ui2c->PROTCTL = (ui2c->PROTCTL & ~UI2C_PROTCTL_GCFUNC_Msk) |u8GCMode; in UI2C_SetSlaveAddr()
511 void UI2C_SetSlaveAddrMask(UI2C_T *ui2c, uint8_t u8SlaveNo, uint16_t u16SlaveAddrMask) in UI2C_SetSlaveAddrMask() argument
515 ui2c->ADDRMSK1 = u16SlaveAddrMask; in UI2C_SetSlaveAddrMask()
519 ui2c->ADDRMSK0 = u16SlaveAddrMask; in UI2C_SetSlaveAddrMask()
533 void UI2C_EnableTimeout(UI2C_T *ui2c, uint32_t u32TimeoutCnt) in UI2C_EnableTimeout() argument
535 …ui2c->PROTCTL = (ui2c->PROTCTL & ~UI2C_PROTCTL_TOCNT_Msk) | (u32TimeoutCnt << UI2C_PROTCTL_TOCNT_P… in UI2C_EnableTimeout()
536 ui2c->BRGEN = (ui2c->BRGEN & ~UI2C_BRGEN_TMCNTSRC_Msk) | UI2C_BRGEN_TMCNTEN_Msk; in UI2C_EnableTimeout()
548 void UI2C_DisableTimeout(UI2C_T *ui2c) in UI2C_DisableTimeout() argument
550 ui2c->PROTCTL &= ~UI2C_PROTCTL_TOCNT_Msk; in UI2C_DisableTimeout()
551 ui2c->BRGEN &= ~UI2C_BRGEN_TMCNTEN_Msk; in UI2C_DisableTimeout()
566 void UI2C_EnableWakeup(UI2C_T *ui2c, uint8_t u8WakeupMode) in UI2C_EnableWakeup() argument
568 ui2c->WKCTL = (ui2c->WKCTL & ~UI2C_WKCTL_WKADDREN_Msk) | (u8WakeupMode | UI2C_WKCTL_WKEN_Msk); in UI2C_EnableWakeup()
580 void UI2C_DisableWakeup(UI2C_T *ui2c) in UI2C_DisableWakeup() argument
582 ui2c->WKCTL &= ~UI2C_WKCTL_WKEN_Msk; in UI2C_DisableWakeup()
601 uint8_t UI2C_WriteByte(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t data) in UI2C_WriteByte() argument
609 UI2C_START(ui2c); /* Send START */ in UI2C_WriteByte()
614 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteByte()
623 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteByte()
626 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteByte()
627 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteByte()
633 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteByte()
637 … UI2C_SET_DATA(ui2c, data); /* Write data to UI2C_TXDAT */ in UI2C_WriteByte()
648 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteByte()
654 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteByte()
666 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_WriteByte()
688 uint32_t UI2C_WriteMultiBytes(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t *data, uint32_t u32wLen) in UI2C_WriteMultiBytes() argument
695 UI2C_START(ui2c); /* Send START */ in UI2C_WriteMultiBytes()
700 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteMultiBytes()
709 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteMultiBytes()
712 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteMultiBytes()
713 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteMultiBytes()
718 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteMultiBytes()
721 … UI2C_SET_DATA(ui2c, data[u32txLen++]); /* Write data to UI2C_TXDAT */ in UI2C_WriteMultiBytes()
730 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteMultiBytes()
735 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteMultiBytes()
746 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_CT… in UI2C_WriteMultiBytes()
769 uint8_t UI2C_WriteByteOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t data) in UI2C_WriteByteOneReg() argument
776 UI2C_START(ui2c); /* Send START */ in UI2C_WriteByteOneReg()
781 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteByteOneReg()
790 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteByteOneReg()
793 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteByteOneReg()
794 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteByteOneReg()
799 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteByteOneReg()
803 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address to UI2C_TXDAT */ in UI2C_WriteByteOneReg()
808 … UI2C_SET_DATA(ui2c, data); /* Write data to UI2C_TXDAT */ in UI2C_WriteByteOneReg()
819 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteByteOneReg()
825 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteByteOneReg()
837 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_CT… in UI2C_WriteByteOneReg()
861 uint32_t UI2C_WriteMultiBytesOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t … in UI2C_WriteMultiBytesOneReg() argument
869 UI2C_START(ui2c); /* Send START */ in UI2C_WriteMultiBytesOneReg()
874 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteMultiBytesOneReg()
883 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteMultiBytesOneReg()
886 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteMultiBytesOneReg()
887 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteMultiBytesOneReg()
893 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteMultiBytesOneReg()
897 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address to UI2C_TXDAT */ in UI2C_WriteMultiBytesOneReg()
903 … UI2C_SET_DATA(ui2c, data[u32txLen++]); /* Write data to UI2C_TXDAT */ in UI2C_WriteMultiBytesOneReg()
913 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteMultiBytesOneReg()
918 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteMultiBytesOneReg()
929 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_CT… in UI2C_WriteMultiBytesOneReg()
952 uint8_t UI2C_WriteByteTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8_t data) in UI2C_WriteByteTwoRegs() argument
959 UI2C_START(ui2c); /* Send START */ in UI2C_WriteByteTwoRegs()
964 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteByteTwoRegs()
973 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteByteTwoRegs()
976 … UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteByteTwoRegs()
977 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_… in UI2C_WriteByteTwoRegs()
982 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteByteTwoRegs()
986 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte data address to U… in UI2C_WriteByteTwoRegs()
991 …UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte data address to UI2C… in UI2C_WriteByteTwoRegs()
996 … UI2C_SET_DATA(ui2c, data); /* Write data to UI2C_TXDAT */ in UI2C_WriteByteTwoRegs()
1007 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteByteTwoRegs()
1013 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteByteTwoRegs()
1025 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2… in UI2C_WriteByteTwoRegs()
1049 uint32_t UI2C_WriteMultiBytesTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8… in UI2C_WriteMultiBytesTwoRegs() argument
1057 UI2C_START(ui2c); /* Send START */ in UI2C_WriteMultiBytesTwoRegs()
1062 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteMultiBytesTwoRegs()
1071 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteMultiBytesTwoRegs()
1074 … UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1075 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_… in UI2C_WriteMultiBytesTwoRegs()
1081 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1085 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte data address to U… in UI2C_WriteMultiBytesTwoRegs()
1092 …UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte data address to UI2C… in UI2C_WriteMultiBytesTwoRegs()
1099 … UI2C_SET_DATA(ui2c, data[u32txLen++]); /* Write data to UI2C_TXDAT */ in UI2C_WriteMultiBytesTwoRegs()
1111 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1116 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1127 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2… in UI2C_WriteMultiBytesTwoRegs()
1146 uint8_t UI2C_ReadByte(UI2C_T *ui2c, uint8_t u8SlaveAddr) in UI2C_ReadByte() argument
1154 UI2C_START(ui2c); /* Send START */ in UI2C_ReadByte()
1159 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadByte()
1168 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadByte()
1171 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadByte()
1172 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register UI2C_TXDA… in UI2C_ReadByte()
1178 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadByte()
1183 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadByte()
1191 rdata = (unsigned char) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadByte()
1199 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadByte()
1211 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadByte()
1236 uint32_t UI2C_ReadMultiBytes(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t *rdata, uint32_t u32rLen) in UI2C_ReadMultiBytes() argument
1244 UI2C_START(ui2c); /* Send START */ in UI2C_ReadMultiBytes()
1249 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadMultiBytes()
1258 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadMultiBytes()
1261 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadMultiBytes()
1262 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register UI2C_TXDA… in UI2C_ReadMultiBytes()
1268 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadMultiBytes()
1277 rdata[u32rxLen++] = (unsigned char) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytes()
1288 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadMultiBytes()
1291 rdata[u32rxLen++] = (unsigned char) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytes()
1298 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadMultiBytes()
1309 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadMultiBytes()
1330 uint8_t UI2C_ReadByteOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr) in UI2C_ReadByteOneReg() argument
1338 UI2C_START(ui2c); /* Send START */ in UI2C_ReadByteOneReg()
1343 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadByteOneReg()
1352 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadByteOneReg()
1355 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadByteOneReg()
1359 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadByteOneReg()
1364 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadByteOneReg()
1372 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadByteOneReg()
1376 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address of register */ in UI2C_ReadByteOneReg()
1395 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadByteOneReg()
1399 rdata = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadByteOneReg()
1411 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadByteOneReg()
1423 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadByteOneReg()
1448 uint32_t UI2C_ReadMultiBytesOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t *… in UI2C_ReadMultiBytesOneReg() argument
1456 UI2C_START(ui2c); /* Send START */ in UI2C_ReadMultiBytesOneReg()
1461 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadMultiBytesOneReg()
1470 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadMultiBytesOneReg()
1473 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadMultiBytesOneReg()
1477 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadMultiBytesOneReg()
1482 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadMultiBytesOneReg()
1490 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadMultiBytesOneReg()
1494 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address of register */ in UI2C_ReadMultiBytesOneReg()
1511 rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesOneReg()
1522 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadMultiBytesOneReg()
1525 … rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesOneReg()
1532 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadMultiBytesOneReg()
1543 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadMultiBytesOneReg()
1563 uint8_t UI2C_ReadByteTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr) in UI2C_ReadByteTwoRegs() argument
1571 UI2C_START(ui2c); /* Send START */ in UI2C_ReadByteTwoRegs()
1576 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadByteTwoRegs()
1585 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadByteTwoRegs()
1588 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadByteTwoRegs()
1592 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadByteTwoRegs()
1597 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadByteTwoRegs()
1605 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadByteTwoRegs()
1609 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte address of regist… in UI2C_ReadByteTwoRegs()
1616 … UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte address of register */ in UI2C_ReadByteTwoRegs()
1635 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadByteTwoRegs()
1639 rdata = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadByteTwoRegs()
1651 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadByteTwoRegs()
1663 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadByteTwoRegs()
1688 uint32_t UI2C_ReadMultiBytesTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8_… in UI2C_ReadMultiBytesTwoRegs() argument
1696 UI2C_START(ui2c); /* Send START */ in UI2C_ReadMultiBytesTwoRegs()
1701 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadMultiBytesTwoRegs()
1710 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadMultiBytesTwoRegs()
1713 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1717 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadMultiBytesTwoRegs()
1722 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadMultiBytesTwoRegs()
1730 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1734 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte address of regist… in UI2C_ReadMultiBytesTwoRegs()
1741 … UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte address of register */ in UI2C_ReadMultiBytesTwoRegs()
1757 rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesTwoRegs()
1768 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1771 … rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesTwoRegs()
1778 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1789 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadMultiBytesTwoRegs()