Lines Matching refs:ui2c

34 uint32_t UI2C_Open(UI2C_T *ui2c, uint32_t u32BusClock)  in UI2C_Open()  argument
39 if( ui2c == UI2C0 ) in UI2C_Open()
51 ui2c->CTL &= ~UI2C_CTL_FUNMODE_Msk; in UI2C_Open()
52 ui2c->CTL = 4U << UI2C_CTL_FUNMODE_Pos; in UI2C_Open()
56 ui2c->LINECTL &= ~UI2C_LINECTL_DWIDTH_Msk; in UI2C_Open()
57 ui2c->LINECTL |= 8U << UI2C_LINECTL_DWIDTH_Pos; in UI2C_Open()
60 ui2c->LINECTL &= ~UI2C_LINECTL_LSB_Msk; in UI2C_Open()
63 ui2c->BRGEN &= ~UI2C_BRGEN_CLKDIV_Msk; in UI2C_Open()
64 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_Open()
65 ui2c->PROTCTL |= UI2C_PROTCTL_PROTEN_Msk; in UI2C_Open()
79 void UI2C_Close(UI2C_T *ui2c) in UI2C_Close() argument
82 ui2c->CTL &= ~UI2C_CTL_FUNMODE_Msk; in UI2C_Close()
94 void UI2C_ClearTimeoutFlag(UI2C_T *ui2c) in UI2C_ClearTimeoutFlag() argument
96 ui2c->PROTSTS = UI2C_PROTSTS_TOIF_Msk; in UI2C_ClearTimeoutFlag()
112 void UI2C_Trigger(UI2C_T *ui2c, uint8_t u8Start, uint8_t u8Stop, uint8_t u8Ptrg, uint8_t u8Ack) in UI2C_Trigger() argument
115 …uint32_t u32Val = ui2c->PROTCTL & ~(UI2C_PROTCTL_STA_Msk | UI2C_PROTCTL_STO_Msk | UI2C_PROTCTL_AA_… in UI2C_Trigger()
134 ui2c->PROTCTL = u32Val | u32Reg; in UI2C_Trigger()
156 void UI2C_DisableInt(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_DisableInt() argument
161 ui2c->PROTIEN &= ~UI2C_PROTIEN_TOIEN_Msk; in UI2C_DisableInt()
167 ui2c->PROTIEN &= ~UI2C_PROTIEN_STARIEN_Msk; in UI2C_DisableInt()
173 ui2c->PROTIEN &= ~UI2C_PROTIEN_STORIEN_Msk; in UI2C_DisableInt()
179 ui2c->PROTIEN &= ~UI2C_PROTIEN_NACKIEN_Msk; in UI2C_DisableInt()
185 ui2c->PROTIEN &= ~UI2C_PROTIEN_ARBLOIEN_Msk; in UI2C_DisableInt()
191 ui2c->PROTIEN &= ~UI2C_PROTIEN_ERRIEN_Msk; in UI2C_DisableInt()
197 ui2c->PROTIEN &= ~UI2C_PROTIEN_ACKIEN_Msk; in UI2C_DisableInt()
218 void UI2C_EnableInt(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_EnableInt() argument
223 ui2c->PROTIEN |= UI2C_PROTIEN_TOIEN_Msk; in UI2C_EnableInt()
229 ui2c->PROTIEN |= UI2C_PROTIEN_STARIEN_Msk; in UI2C_EnableInt()
235 ui2c->PROTIEN |= UI2C_PROTIEN_STORIEN_Msk; in UI2C_EnableInt()
241 ui2c->PROTIEN |= UI2C_PROTIEN_NACKIEN_Msk; in UI2C_EnableInt()
247 ui2c->PROTIEN |= UI2C_PROTIEN_ARBLOIEN_Msk; in UI2C_EnableInt()
253 ui2c->PROTIEN |= UI2C_PROTIEN_ERRIEN_Msk; in UI2C_EnableInt()
259 ui2c->PROTIEN |= UI2C_PROTIEN_ACKIEN_Msk; in UI2C_EnableInt()
272 uint32_t UI2C_GetBusClockFreq(UI2C_T *ui2c) in UI2C_GetBusClockFreq() argument
277 if (ui2c == UI2C0) in UI2C_GetBusClockFreq()
286 u32Divider = (ui2c->BRGEN & UI2C_BRGEN_CLKDIV_Msk) >> UI2C_BRGEN_CLKDIV_Pos; in UI2C_GetBusClockFreq()
301 uint32_t UI2C_SetBusClockFreq(UI2C_T *ui2c, uint32_t u32BusClock) in UI2C_SetBusClockFreq() argument
306 if( ui2c == UI2C0 ) in UI2C_SetBusClockFreq()
318 ui2c->BRGEN &= ~UI2C_BRGEN_CLKDIV_Msk; in UI2C_SetBusClockFreq()
319 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_SetBusClockFreq()
343 uint32_t UI2C_GetIntFlag(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_GetIntFlag() argument
348 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_TOIF_Msk; in UI2C_GetIntFlag()
355 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_STARIF_Msk; in UI2C_GetIntFlag()
362 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_STORIF_Msk; in UI2C_GetIntFlag()
369 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_NACKIF_Msk; in UI2C_GetIntFlag()
376 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_ARBLOIF_Msk; in UI2C_GetIntFlag()
383 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_ERRIF_Msk; in UI2C_GetIntFlag()
390 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_ACKIF_Msk; in UI2C_GetIntFlag()
418 void UI2C_ClearIntFlag(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_ClearIntFlag() argument
423 ui2c->PROTSTS = UI2C_PROTSTS_TOIF_Msk; in UI2C_ClearIntFlag()
429 ui2c->PROTSTS = UI2C_PROTSTS_STARIF_Msk; in UI2C_ClearIntFlag()
435 ui2c->PROTSTS = UI2C_PROTSTS_STORIF_Msk; in UI2C_ClearIntFlag()
441 ui2c->PROTSTS = UI2C_PROTSTS_NACKIF_Msk; in UI2C_ClearIntFlag()
447 ui2c->PROTSTS = UI2C_PROTSTS_ARBLOIF_Msk; in UI2C_ClearIntFlag()
453 ui2c->PROTSTS = UI2C_PROTSTS_ERRIF_Msk; in UI2C_ClearIntFlag()
459 ui2c->PROTSTS = UI2C_PROTSTS_ACKIF_Msk; in UI2C_ClearIntFlag()
472 uint32_t UI2C_GetData(UI2C_T *ui2c) in UI2C_GetData() argument
474 return ( ui2c->RXDAT ); in UI2C_GetData()
487 void UI2C_SetData(UI2C_T *ui2c, uint8_t u8Data) in UI2C_SetData() argument
489 ui2c->TXDAT = u8Data; in UI2C_SetData()
506 void UI2C_SetSlaveAddr(UI2C_T *ui2c, uint8_t u8SlaveNo, uint16_t u16SlaveAddr, uint8_t u8GCMode) in UI2C_SetSlaveAddr() argument
510 ui2c->DEVADDR1 = u16SlaveAddr; in UI2C_SetSlaveAddr()
514 ui2c->DEVADDR0 = u16SlaveAddr; in UI2C_SetSlaveAddr()
517 ui2c->PROTCTL = (ui2c->PROTCTL & ~UI2C_PROTCTL_GCFUNC_Msk) |u8GCMode; in UI2C_SetSlaveAddr()
532 void UI2C_SetSlaveAddrMask(UI2C_T *ui2c, uint8_t u8SlaveNo, uint16_t u16SlaveAddrMask) in UI2C_SetSlaveAddrMask() argument
536 ui2c->ADDRMSK1 = u16SlaveAddrMask; in UI2C_SetSlaveAddrMask()
540 ui2c->ADDRMSK0 = u16SlaveAddrMask; in UI2C_SetSlaveAddrMask()
554 void UI2C_EnableTimeout(UI2C_T *ui2c, uint32_t u32TimeoutCnt) in UI2C_EnableTimeout() argument
556ui2c->PROTCTL = (ui2c->PROTCTL & ~UI2C_PROTCTL_TOCNT_Msk) | (u32TimeoutCnt << UI2C_PROTCTL_TOCNT_P… in UI2C_EnableTimeout()
557 ui2c->BRGEN = (ui2c->BRGEN & ~UI2C_BRGEN_TMCNTSRC_Msk) | UI2C_BRGEN_TMCNTEN_Msk; in UI2C_EnableTimeout()
569 void UI2C_DisableTimeout(UI2C_T *ui2c) in UI2C_DisableTimeout() argument
571 ui2c->PROTCTL &= ~UI2C_PROTCTL_TOCNT_Msk; in UI2C_DisableTimeout()
572 ui2c->BRGEN &= ~UI2C_BRGEN_TMCNTEN_Msk; in UI2C_DisableTimeout()
587 void UI2C_EnableWakeup(UI2C_T *ui2c, uint8_t u8WakeupMode) in UI2C_EnableWakeup() argument
589 ui2c->WKCTL = (ui2c->WKCTL & ~UI2C_WKCTL_WKADDREN_Msk) | (u8WakeupMode | UI2C_WKCTL_WKEN_Msk); in UI2C_EnableWakeup()
601 void UI2C_DisableWakeup(UI2C_T *ui2c) in UI2C_DisableWakeup() argument
603 ui2c->WKCTL &= ~UI2C_WKCTL_WKEN_Msk; in UI2C_DisableWakeup()
620 uint8_t UI2C_WriteByte(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t data) in UI2C_WriteByte() argument
625 UI2C_START(ui2c); /* Send START */ in UI2C_WriteByte()
629 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_WriteByte()
631 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteByte()
634 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteByte()
635 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteByte()
641 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteByte()
645 … UI2C_SET_DATA(ui2c, data); /* Write data to UI2C_TXDAT */ in UI2C_WriteByte()
656 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteByte()
662 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteByte()
674 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_WriteByte()
694 uint32_t UI2C_WriteMultiBytes(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t *data, uint32_t u32wLen) in UI2C_WriteMultiBytes() argument
699 UI2C_START(ui2c); /* Send START */ in UI2C_WriteMultiBytes()
703 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_WriteMultiBytes()
705 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteMultiBytes()
708 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteMultiBytes()
709 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteMultiBytes()
714 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteMultiBytes()
717 … UI2C_SET_DATA(ui2c, data[u32txLen++]); /* Write data to UI2C_TXDAT */ in UI2C_WriteMultiBytes()
726 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteMultiBytes()
731 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteMultiBytes()
742 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_CT… in UI2C_WriteMultiBytes()
763 uint8_t UI2C_WriteByteOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t data) in UI2C_WriteByteOneReg() argument
768 UI2C_START(ui2c); /* Send START */ in UI2C_WriteByteOneReg()
772 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_WriteByteOneReg()
774 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteByteOneReg()
777 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteByteOneReg()
778 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteByteOneReg()
783 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteByteOneReg()
787 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address to UI2C_TXDAT */ in UI2C_WriteByteOneReg()
792 … UI2C_SET_DATA(ui2c, data); /* Write data to UI2C_TXDAT */ in UI2C_WriteByteOneReg()
803 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteByteOneReg()
809 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteByteOneReg()
821 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_CT… in UI2C_WriteByteOneReg()
843 uint32_t UI2C_WriteMultiBytesOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t … in UI2C_WriteMultiBytesOneReg() argument
849 UI2C_START(ui2c); /* Send START */ in UI2C_WriteMultiBytesOneReg()
853 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_WriteMultiBytesOneReg()
855 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteMultiBytesOneReg()
858 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteMultiBytesOneReg()
859 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteMultiBytesOneReg()
865 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteMultiBytesOneReg()
869 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address to UI2C_TXDAT */ in UI2C_WriteMultiBytesOneReg()
875 … UI2C_SET_DATA(ui2c, data[u32txLen++]); /* Write data to UI2C_TXDAT */ in UI2C_WriteMultiBytesOneReg()
885 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteMultiBytesOneReg()
890 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteMultiBytesOneReg()
901 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_CT… in UI2C_WriteMultiBytesOneReg()
922 uint8_t UI2C_WriteByteTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8_t data) in UI2C_WriteByteTwoRegs() argument
927 UI2C_START(ui2c); /* Send START */ in UI2C_WriteByteTwoRegs()
931 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_WriteByteTwoRegs()
933 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteByteTwoRegs()
936 … UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteByteTwoRegs()
937 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_… in UI2C_WriteByteTwoRegs()
942 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteByteTwoRegs()
946 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte data address to U… in UI2C_WriteByteTwoRegs()
951 …UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte data address to UI2C… in UI2C_WriteByteTwoRegs()
956 … UI2C_SET_DATA(ui2c, data); /* Write data to UI2C_TXDAT */ in UI2C_WriteByteTwoRegs()
967 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteByteTwoRegs()
973 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteByteTwoRegs()
985 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2… in UI2C_WriteByteTwoRegs()
1007 uint32_t UI2C_WriteMultiBytesTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8… in UI2C_WriteMultiBytesTwoRegs() argument
1013 UI2C_START(ui2c); /* Send START */ in UI2C_WriteMultiBytesTwoRegs()
1017 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_WriteMultiBytesTwoRegs()
1019 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteMultiBytesTwoRegs()
1022 … UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1023 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_… in UI2C_WriteMultiBytesTwoRegs()
1029 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1033 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte data address to U… in UI2C_WriteMultiBytesTwoRegs()
1040 …UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte data address to UI2C… in UI2C_WriteMultiBytesTwoRegs()
1047 … UI2C_SET_DATA(ui2c, data[u32txLen++]); /* Write data to UI2C_TXDAT */ in UI2C_WriteMultiBytesTwoRegs()
1059 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1064 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1075 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2… in UI2C_WriteMultiBytesTwoRegs()
1092 uint8_t UI2C_ReadByte(UI2C_T *ui2c, uint8_t u8SlaveAddr) in UI2C_ReadByte() argument
1097 UI2C_START(ui2c); /* Send START */ in UI2C_ReadByte()
1101 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_ReadByte()
1103 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadByte()
1106 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadByte()
1107 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register UI2C_TXDA… in UI2C_ReadByte()
1113 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadByte()
1118 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadByte()
1126 rdata = (unsigned char) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadByte()
1134 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadByte()
1146 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadByte()
1170 uint32_t UI2C_ReadMultiBytes(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t *rdata, uint32_t u32rLen) in UI2C_ReadMultiBytes() argument
1176 UI2C_START(ui2c); /* Send START */ in UI2C_ReadMultiBytes()
1180 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_ReadMultiBytes()
1182 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadMultiBytes()
1185 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadMultiBytes()
1186 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register UI2C_TXDA… in UI2C_ReadMultiBytes()
1192 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadMultiBytes()
1201 rdata[u32rxLen++] = (unsigned char) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytes()
1212 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadMultiBytes()
1215 rdata[u32rxLen++] = (unsigned char) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytes()
1222 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadMultiBytes()
1233 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadMultiBytes()
1253 uint8_t UI2C_ReadByteOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr) in UI2C_ReadByteOneReg() argument
1258 UI2C_START(ui2c); /* Send START */ in UI2C_ReadByteOneReg()
1262 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_ReadByteOneReg()
1264 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadByteOneReg()
1267 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadByteOneReg()
1271 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadByteOneReg()
1276 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadByteOneReg()
1284 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadByteOneReg()
1288 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address of register */ in UI2C_ReadByteOneReg()
1307 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadByteOneReg()
1311 rdata = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadByteOneReg()
1323 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadByteOneReg()
1335 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadByteOneReg()
1359 uint32_t UI2C_ReadMultiBytesOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t *… in UI2C_ReadMultiBytesOneReg() argument
1365 UI2C_START(ui2c); /* Send START */ in UI2C_ReadMultiBytesOneReg()
1369 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_ReadMultiBytesOneReg()
1371 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadMultiBytesOneReg()
1374 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadMultiBytesOneReg()
1378 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadMultiBytesOneReg()
1383 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadMultiBytesOneReg()
1391 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadMultiBytesOneReg()
1395 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address of register */ in UI2C_ReadMultiBytesOneReg()
1412 rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesOneReg()
1423 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadMultiBytesOneReg()
1426 … rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesOneReg()
1433 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadMultiBytesOneReg()
1444 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadMultiBytesOneReg()
1463 uint8_t UI2C_ReadByteTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr) in UI2C_ReadByteTwoRegs() argument
1468 UI2C_START(ui2c); /* Send START */ in UI2C_ReadByteTwoRegs()
1472 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_ReadByteTwoRegs()
1474 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadByteTwoRegs()
1477 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadByteTwoRegs()
1481 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadByteTwoRegs()
1486 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadByteTwoRegs()
1494 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadByteTwoRegs()
1498 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte address of regist… in UI2C_ReadByteTwoRegs()
1505 … UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte address of register */ in UI2C_ReadByteTwoRegs()
1524 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadByteTwoRegs()
1528 rdata = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadByteTwoRegs()
1540 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadByteTwoRegs()
1552 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadByteTwoRegs()
1576 uint32_t UI2C_ReadMultiBytesTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8_… in UI2C_ReadMultiBytesTwoRegs() argument
1582 UI2C_START(ui2c); /* Send START */ in UI2C_ReadMultiBytesTwoRegs()
1586 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)); /* Wait UI2C new status occur… in UI2C_ReadMultiBytesTwoRegs()
1588 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadMultiBytesTwoRegs()
1591 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1595 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadMultiBytesTwoRegs()
1600 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadMultiBytesTwoRegs()
1608 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1612 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte address of regist… in UI2C_ReadMultiBytesTwoRegs()
1619 … UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte address of register */ in UI2C_ReadMultiBytesTwoRegs()
1635 rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesTwoRegs()
1646 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1649 … rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesTwoRegs()
1656 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1667 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadMultiBytesTwoRegs()