Lines Matching refs:ui2c
35 uint32_t UI2C_Open(UI2C_T *ui2c, uint32_t u32BusClock) in UI2C_Open() argument
40 if( ui2c == UI2C0 ) in UI2C_Open()
52 ui2c->CTL &= ~UI2C_CTL_FUNMODE_Msk; in UI2C_Open()
53 ui2c->CTL = 4U << UI2C_CTL_FUNMODE_Pos; in UI2C_Open()
57 ui2c->LINECTL &= ~UI2C_LINECTL_DWIDTH_Msk; in UI2C_Open()
58 ui2c->LINECTL |= 8U << UI2C_LINECTL_DWIDTH_Pos; in UI2C_Open()
61 ui2c->LINECTL &= ~UI2C_LINECTL_LSB_Msk; in UI2C_Open()
64 ui2c->BRGEN &= ~UI2C_BRGEN_CLKDIV_Msk; in UI2C_Open()
65 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_Open()
66 ui2c->PROTCTL |= UI2C_PROTCTL_PROTEN_Msk; in UI2C_Open()
80 void UI2C_Close(UI2C_T *ui2c) in UI2C_Close() argument
83 ui2c->CTL &= ~UI2C_CTL_FUNMODE_Msk; in UI2C_Close()
95 void UI2C_ClearTimeoutFlag(UI2C_T *ui2c) in UI2C_ClearTimeoutFlag() argument
97 ui2c->PROTSTS = UI2C_PROTSTS_TOIF_Msk; in UI2C_ClearTimeoutFlag()
113 void UI2C_Trigger(UI2C_T *ui2c, uint8_t u8Start, uint8_t u8Stop, uint8_t u8Ptrg, uint8_t u8Ack) in UI2C_Trigger() argument
116 …uint32_t u32Val = ui2c->PROTCTL & ~(UI2C_PROTCTL_STA_Msk | UI2C_PROTCTL_STO_Msk | UI2C_PROTCTL_AA_… in UI2C_Trigger()
135 ui2c->PROTCTL = u32Val | u32Reg; in UI2C_Trigger()
157 void UI2C_DisableInt(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_DisableInt() argument
162 ui2c->PROTIEN &= ~UI2C_PROTIEN_TOIEN_Msk; in UI2C_DisableInt()
168 ui2c->PROTIEN &= ~UI2C_PROTIEN_STARIEN_Msk; in UI2C_DisableInt()
174 ui2c->PROTIEN &= ~UI2C_PROTIEN_STORIEN_Msk; in UI2C_DisableInt()
180 ui2c->PROTIEN &= ~UI2C_PROTIEN_NACKIEN_Msk; in UI2C_DisableInt()
186 ui2c->PROTIEN &= ~UI2C_PROTIEN_ARBLOIEN_Msk; in UI2C_DisableInt()
192 ui2c->PROTIEN &= ~UI2C_PROTIEN_ERRIEN_Msk; in UI2C_DisableInt()
198 ui2c->PROTIEN &= ~UI2C_PROTIEN_ACKIEN_Msk; in UI2C_DisableInt()
219 void UI2C_EnableInt(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_EnableInt() argument
224 ui2c->PROTIEN |= UI2C_PROTIEN_TOIEN_Msk; in UI2C_EnableInt()
230 ui2c->PROTIEN |= UI2C_PROTIEN_STARIEN_Msk; in UI2C_EnableInt()
236 ui2c->PROTIEN |= UI2C_PROTIEN_STORIEN_Msk; in UI2C_EnableInt()
242 ui2c->PROTIEN |= UI2C_PROTIEN_NACKIEN_Msk; in UI2C_EnableInt()
248 ui2c->PROTIEN |= UI2C_PROTIEN_ARBLOIEN_Msk; in UI2C_EnableInt()
254 ui2c->PROTIEN |= UI2C_PROTIEN_ERRIEN_Msk; in UI2C_EnableInt()
260 ui2c->PROTIEN |= UI2C_PROTIEN_ACKIEN_Msk; in UI2C_EnableInt()
273 uint32_t UI2C_GetBusClockFreq(UI2C_T *ui2c) in UI2C_GetBusClockFreq() argument
278 if (ui2c == UI2C0) in UI2C_GetBusClockFreq()
287 u32Divider = (ui2c->BRGEN & UI2C_BRGEN_CLKDIV_Msk) >> UI2C_BRGEN_CLKDIV_Pos; in UI2C_GetBusClockFreq()
302 uint32_t UI2C_SetBusClockFreq(UI2C_T *ui2c, uint32_t u32BusClock) in UI2C_SetBusClockFreq() argument
307 if( ui2c == UI2C0 ) in UI2C_SetBusClockFreq()
319 ui2c->BRGEN &= ~UI2C_BRGEN_CLKDIV_Msk; in UI2C_SetBusClockFreq()
320 ui2c->BRGEN |= (u32ClkDiv << UI2C_BRGEN_CLKDIV_Pos); in UI2C_SetBusClockFreq()
344 uint32_t UI2C_GetIntFlag(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_GetIntFlag() argument
349 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_TOIF_Msk; in UI2C_GetIntFlag()
356 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_STARIF_Msk; in UI2C_GetIntFlag()
363 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_STORIF_Msk; in UI2C_GetIntFlag()
370 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_NACKIF_Msk; in UI2C_GetIntFlag()
377 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_ARBLOIF_Msk; in UI2C_GetIntFlag()
384 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_ERRIF_Msk; in UI2C_GetIntFlag()
391 u32TmpValue = ui2c->PROTSTS & UI2C_PROTSTS_ACKIF_Msk; in UI2C_GetIntFlag()
419 void UI2C_ClearIntFlag(UI2C_T *ui2c, uint32_t u32Mask) in UI2C_ClearIntFlag() argument
424 ui2c->PROTSTS = UI2C_PROTSTS_TOIF_Msk; in UI2C_ClearIntFlag()
430 ui2c->PROTSTS = UI2C_PROTSTS_STARIF_Msk; in UI2C_ClearIntFlag()
436 ui2c->PROTSTS = UI2C_PROTSTS_STORIF_Msk; in UI2C_ClearIntFlag()
442 ui2c->PROTSTS = UI2C_PROTSTS_NACKIF_Msk; in UI2C_ClearIntFlag()
448 ui2c->PROTSTS = UI2C_PROTSTS_ARBLOIF_Msk; in UI2C_ClearIntFlag()
454 ui2c->PROTSTS = UI2C_PROTSTS_ERRIF_Msk; in UI2C_ClearIntFlag()
460 ui2c->PROTSTS = UI2C_PROTSTS_ACKIF_Msk; in UI2C_ClearIntFlag()
473 uint32_t UI2C_GetData(UI2C_T *ui2c) in UI2C_GetData() argument
475 return ( ui2c->RXDAT ); in UI2C_GetData()
488 void UI2C_SetData(UI2C_T *ui2c, uint8_t u8Data) in UI2C_SetData() argument
490 ui2c->TXDAT = u8Data; in UI2C_SetData()
507 void UI2C_SetSlaveAddr(UI2C_T *ui2c, uint8_t u8SlaveNo, uint16_t u16SlaveAddr, uint8_t u8GCMode) in UI2C_SetSlaveAddr() argument
511 ui2c->DEVADDR1 = u16SlaveAddr; in UI2C_SetSlaveAddr()
515 ui2c->DEVADDR0 = u16SlaveAddr; in UI2C_SetSlaveAddr()
518 ui2c->PROTCTL = (ui2c->PROTCTL & ~UI2C_PROTCTL_GCFUNC_Msk) |u8GCMode; in UI2C_SetSlaveAddr()
533 void UI2C_SetSlaveAddrMask(UI2C_T *ui2c, uint8_t u8SlaveNo, uint16_t u16SlaveAddrMask) in UI2C_SetSlaveAddrMask() argument
537 ui2c->ADDRMSK1 = u16SlaveAddrMask; in UI2C_SetSlaveAddrMask()
541 ui2c->ADDRMSK0 = u16SlaveAddrMask; in UI2C_SetSlaveAddrMask()
555 void UI2C_EnableTimeout(UI2C_T *ui2c, uint32_t u32TimeoutCnt) in UI2C_EnableTimeout() argument
557 …ui2c->PROTCTL = (ui2c->PROTCTL & ~UI2C_PROTCTL_TOCNT_Msk) | (u32TimeoutCnt << UI2C_PROTCTL_TOCNT_P… in UI2C_EnableTimeout()
558 ui2c->BRGEN = (ui2c->BRGEN & ~UI2C_BRGEN_TMCNTSRC_Msk) | UI2C_BRGEN_TMCNTEN_Msk; in UI2C_EnableTimeout()
570 void UI2C_DisableTimeout(UI2C_T *ui2c) in UI2C_DisableTimeout() argument
572 ui2c->PROTCTL &= ~UI2C_PROTCTL_TOCNT_Msk; in UI2C_DisableTimeout()
573 ui2c->BRGEN &= ~UI2C_BRGEN_TMCNTEN_Msk; in UI2C_DisableTimeout()
588 void UI2C_EnableWakeup(UI2C_T *ui2c, uint8_t u8WakeupMode) in UI2C_EnableWakeup() argument
590 ui2c->WKCTL = (ui2c->WKCTL & ~UI2C_WKCTL_WKADDREN_Msk) | (u8WakeupMode | UI2C_WKCTL_WKEN_Msk); in UI2C_EnableWakeup()
602 void UI2C_DisableWakeup(UI2C_T *ui2c) in UI2C_DisableWakeup() argument
604 ui2c->WKCTL &= ~UI2C_WKCTL_WKEN_Msk; in UI2C_DisableWakeup()
621 uint8_t UI2C_WriteByte(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t data) in UI2C_WriteByte() argument
629 UI2C_START(ui2c); /* Send START */ in UI2C_WriteByte()
634 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteByte()
643 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteByte()
646 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteByte()
647 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteByte()
653 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteByte()
657 … UI2C_SET_DATA(ui2c, data); /* Write data to UI2C_TXDAT */ in UI2C_WriteByte()
668 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteByte()
674 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteByte()
686 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_WriteByte()
706 uint32_t UI2C_WriteMultiBytes(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t *data, uint32_t u32wLen) in UI2C_WriteMultiBytes() argument
713 UI2C_START(ui2c); /* Send START */ in UI2C_WriteMultiBytes()
718 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteMultiBytes()
727 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteMultiBytes()
730 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteMultiBytes()
731 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteMultiBytes()
736 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteMultiBytes()
739 … UI2C_SET_DATA(ui2c, data[u32txLen++]); /* Write data to UI2C_TXDAT */ in UI2C_WriteMultiBytes()
748 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteMultiBytes()
753 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteMultiBytes()
764 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_CT… in UI2C_WriteMultiBytes()
785 uint8_t UI2C_WriteByteOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t data) in UI2C_WriteByteOneReg() argument
792 UI2C_START(ui2c); /* Send START */ in UI2C_WriteByteOneReg()
797 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteByteOneReg()
806 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteByteOneReg()
809 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteByteOneReg()
810 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteByteOneReg()
815 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteByteOneReg()
819 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address to UI2C_TXDAT */ in UI2C_WriteByteOneReg()
824 … UI2C_SET_DATA(ui2c, data); /* Write data to UI2C_TXDAT */ in UI2C_WriteByteOneReg()
835 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteByteOneReg()
841 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteByteOneReg()
853 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_CT… in UI2C_WriteByteOneReg()
875 uint32_t UI2C_WriteMultiBytesOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t … in UI2C_WriteMultiBytesOneReg() argument
883 UI2C_START(ui2c); /* Send START */ in UI2C_WriteMultiBytesOneReg()
888 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteMultiBytesOneReg()
897 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteMultiBytesOneReg()
900 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteMultiBytesOneReg()
901 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDA… in UI2C_WriteMultiBytesOneReg()
907 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteMultiBytesOneReg()
911 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address to UI2C_TXDAT */ in UI2C_WriteMultiBytesOneReg()
917 … UI2C_SET_DATA(ui2c, data[u32txLen++]); /* Write data to UI2C_TXDAT */ in UI2C_WriteMultiBytesOneReg()
927 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteMultiBytesOneReg()
932 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteMultiBytesOneReg()
943 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_CT… in UI2C_WriteMultiBytesOneReg()
964 uint8_t UI2C_WriteByteTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8_t data) in UI2C_WriteByteTwoRegs() argument
971 UI2C_START(ui2c); /* Send START */ in UI2C_WriteByteTwoRegs()
976 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteByteTwoRegs()
985 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteByteTwoRegs()
988 … UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteByteTwoRegs()
989 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_… in UI2C_WriteByteTwoRegs()
994 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteByteTwoRegs()
998 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte data address to U… in UI2C_WriteByteTwoRegs()
1003 …UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte data address to UI2C… in UI2C_WriteByteTwoRegs()
1008 … UI2C_SET_DATA(ui2c, data); /* Write data to UI2C_TXDAT */ in UI2C_WriteByteTwoRegs()
1019 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteByteTwoRegs()
1025 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteByteTwoRegs()
1037 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2… in UI2C_WriteByteTwoRegs()
1059 uint32_t UI2C_WriteMultiBytesTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8… in UI2C_WriteMultiBytesTwoRegs() argument
1067 UI2C_START(ui2c); /* Send START */ in UI2C_WriteMultiBytesTwoRegs()
1072 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_WriteMultiBytesTwoRegs()
1081 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_WriteMultiBytesTwoRegs()
1084 … UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1085 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_… in UI2C_WriteMultiBytesTwoRegs()
1091 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1095 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte data address to U… in UI2C_WriteMultiBytesTwoRegs()
1102 …UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte data address to UI2C… in UI2C_WriteMultiBytesTwoRegs()
1109 … UI2C_SET_DATA(ui2c, data[u32txLen++]); /* Write data to UI2C_TXDAT */ in UI2C_WriteMultiBytesTwoRegs()
1121 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1126 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_WriteMultiBytesTwoRegs()
1137 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2… in UI2C_WriteMultiBytesTwoRegs()
1154 uint8_t UI2C_ReadByte(UI2C_T *ui2c, uint8_t u8SlaveAddr) in UI2C_ReadByte() argument
1162 UI2C_START(ui2c); /* Send START */ in UI2C_ReadByte()
1167 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadByte()
1176 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadByte()
1179 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadByte()
1180 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register UI2C_TXDA… in UI2C_ReadByte()
1186 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadByte()
1191 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadByte()
1199 rdata = (unsigned char) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadByte()
1207 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadByte()
1219 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadByte()
1243 uint32_t UI2C_ReadMultiBytes(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t *rdata, uint32_t u32rLen) in UI2C_ReadMultiBytes() argument
1251 UI2C_START(ui2c); /* Send START */ in UI2C_ReadMultiBytes()
1256 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadMultiBytes()
1265 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadMultiBytes()
1268 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadMultiBytes()
1269 …UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register UI2C_TXDA… in UI2C_ReadMultiBytes()
1275 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadMultiBytes()
1284 rdata[u32rxLen++] = (unsigned char) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytes()
1295 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadMultiBytes()
1298 rdata[u32rxLen++] = (unsigned char) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytes()
1305 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadMultiBytes()
1316 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadMultiBytes()
1336 uint8_t UI2C_ReadByteOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr) in UI2C_ReadByteOneReg() argument
1344 UI2C_START(ui2c); /* Send START */ in UI2C_ReadByteOneReg()
1349 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadByteOneReg()
1358 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadByteOneReg()
1361 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadByteOneReg()
1365 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadByteOneReg()
1370 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadByteOneReg()
1378 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadByteOneReg()
1382 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address of register */ in UI2C_ReadByteOneReg()
1401 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadByteOneReg()
1405 rdata = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadByteOneReg()
1417 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadByteOneReg()
1429 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadByteOneReg()
1453 uint32_t UI2C_ReadMultiBytesOneReg(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t *… in UI2C_ReadMultiBytesOneReg() argument
1461 UI2C_START(ui2c); /* Send START */ in UI2C_ReadMultiBytesOneReg()
1466 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadMultiBytesOneReg()
1475 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadMultiBytesOneReg()
1478 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadMultiBytesOneReg()
1482 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadMultiBytesOneReg()
1487 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadMultiBytesOneReg()
1495 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadMultiBytesOneReg()
1499 … UI2C_SET_DATA(ui2c, u8DataAddr); /* Write data address of register */ in UI2C_ReadMultiBytesOneReg()
1516 rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesOneReg()
1527 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadMultiBytesOneReg()
1530 … rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesOneReg()
1537 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadMultiBytesOneReg()
1548 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadMultiBytesOneReg()
1567 uint8_t UI2C_ReadByteTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr) in UI2C_ReadByteTwoRegs() argument
1575 UI2C_START(ui2c); /* Send START */ in UI2C_ReadByteTwoRegs()
1580 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadByteTwoRegs()
1589 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadByteTwoRegs()
1592 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadByteTwoRegs()
1596 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadByteTwoRegs()
1601 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadByteTwoRegs()
1609 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadByteTwoRegs()
1613 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte address of regist… in UI2C_ReadByteTwoRegs()
1620 … UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte address of register */ in UI2C_ReadByteTwoRegs()
1639 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadByteTwoRegs()
1643 rdata = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadByteTwoRegs()
1655 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadByteTwoRegs()
1667 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadByteTwoRegs()
1691 uint32_t UI2C_ReadMultiBytesTwoRegs(UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8_… in UI2C_ReadMultiBytesTwoRegs() argument
1699 UI2C_START(ui2c); /* Send START */ in UI2C_ReadMultiBytesTwoRegs()
1704 …while (!(UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U)) /* Wait UI2C new status occur … in UI2C_ReadMultiBytesTwoRegs()
1713 switch (UI2C_GET_PROT_STATUS(ui2c) & 0x3F00U) in UI2C_ReadMultiBytesTwoRegs()
1716 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STARIF_Msk); /* Clear START INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1720 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x00U); /* Write SLA+W to Register UI2C_TXDAT */ in UI2C_ReadMultiBytesTwoRegs()
1725 … UI2C_SET_DATA(ui2c, (u8SlaveAddr << 1U) | 0x01U); /* Write SLA+R to Register TXDAT */ in UI2C_ReadMultiBytesTwoRegs()
1733 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_ACKIF_Msk); /* Clear ACK INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1737 …UI2C_SET_DATA(ui2c, (uint8_t)((u16DataAddr & 0xFF00U) >> 8U)); /* Write Hi byte address of regist… in UI2C_ReadMultiBytesTwoRegs()
1744 … UI2C_SET_DATA(ui2c, (uint8_t)(u16DataAddr & 0xFFU)); /* Write Lo byte address of register */ in UI2C_ReadMultiBytesTwoRegs()
1760 rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesTwoRegs()
1771 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_NACKIF_Msk); /* Clear NACK INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1774 … rdata[u32rxLen++] = (uint8_t) UI2C_GET_DATA(ui2c); /* Receive Data */ in UI2C_ReadMultiBytesTwoRegs()
1781 UI2C_CLR_PROT_INT_FLAG(ui2c, UI2C_PROTSTS_STORIF_Msk); /* Clear STOP INT Flag */ in UI2C_ReadMultiBytesTwoRegs()
1792 …UI2C_SET_CONTROL_REG(ui2c, u8Ctrl); /* Write controlbit to UI2C_PR… in UI2C_ReadMultiBytesTwoRegs()