| M480 BSP V3.05.001 The Board Support Package for M480 Series

Functions
usci_i2c.c File Reference

M480 series USCI I2C(UI2C) driver source file. More...

`#include "NuMicro.h"`

Go to the source code of this file.

## Functions
uint32_t | UI2C_Open (UI2C_T *ui2c, uint32_t u32BusClock)
| This function makes USCI_I2C module be ready and set the wanted bus clock. More...
void | UI2C_Close (UI2C_T *ui2c)
| This function closes the USCI_I2C module. More...
void | UI2C_ClearTimeoutFlag (UI2C_T *ui2c)
| This function clears the time-out flag. More...
void | UI2C_Trigger (UI2C_T *ui2c, uint8_t u8Start, uint8_t u8Stop, uint8_t u8Ptrg, uint8_t u8Ack)
| This function sets the control bit of the USCI_I2C module. More...
void | UI2C_DisableInt (UI2C_T *ui2c, uint32_t u32Mask)
| This function disables the interrupt of USCI_I2C module. More...
void | UI2C_EnableInt (UI2C_T *ui2c, uint32_t u32Mask)
| This function enables the interrupt of USCI_I2C module. More...
uint32_t | UI2C_GetBusClockFreq (UI2C_T *ui2c)
| This function returns the real bus clock of USCI_I2C module. More...
uint32_t | UI2C_SetBusClockFreq (UI2C_T *ui2c, uint32_t u32BusClock)
| This function sets bus clock frequency of USCI_I2C module. More...
uint32_t | UI2C_GetIntFlag (UI2C_T *ui2c, uint32_t u32Mask)
| This function gets the interrupt flag of USCI_I2C module. More...
void | UI2C_ClearIntFlag (UI2C_T *ui2c, uint32_t u32Mask)
| This function clears the interrupt flag of USCI_I2C module. More...
uint32_t | UI2C_GetData (UI2C_T *ui2c)
| This function returns the data stored in data register of USCI_I2C module. More...
void | UI2C_SetData (UI2C_T *ui2c, uint8_t u8Data)
| This function writes a byte data to data register of USCI_I2C module. More...
void | UI2C_SetSlaveAddr (UI2C_T *ui2c, uint8_t u8SlaveNo, uint16_t u16SlaveAddr, uint8_t u8GCMode)
| Configure slave address and enable GC mode. More...
void | UI2C_SetSlaveAddrMask (UI2C_T *ui2c, uint8_t u8SlaveNo, uint16_t u16SlaveAddrMask)
| Configure the mask bit of slave address. More...
void | UI2C_EnableTimeout (UI2C_T *ui2c, uint32_t u32TimeoutCnt)
| This function enables time-out function and configures timeout counter. More...
void | UI2C_DisableTimeout (UI2C_T *ui2c)
| This function disables time-out function. More...
void | UI2C_EnableWakeup (UI2C_T *ui2c, uint8_t u8WakeupMode)
| This function enables the wakeup function of USCI_I2C module. More...
void | UI2C_DisableWakeup (UI2C_T *ui2c)
| This function disables the wakeup function of USCI_I2C module. More...
uint8_t | UI2C_WriteByte (UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t data)
| Write a byte to Slave. More...
uint32_t | UI2C_WriteMultiBytes (UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t *data, uint32_t u32wLen)
| Write multi bytes to Slave. More...
uint8_t | UI2C_WriteByteOneReg (UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t data)
| Specify a byte register address and write a byte to Slave. More...
uint32_t | UI2C_WriteMultiBytesOneReg (UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t *data, uint32_t u32wLen)
| Specify a byte register address and write multi bytes to Slave. More...
uint8_t | UI2C_WriteByteTwoRegs (UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8_t data)
| Specify two bytes register address and Write a byte to Slave. More...
uint32_t | UI2C_WriteMultiBytesTwoRegs (UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8_t *data, uint32_t u32wLen)
| Specify two bytes register address and write multi bytes to Slave. More...
uint8_t | UI2C_ReadByte (UI2C_T *ui2c, uint8_t u8SlaveAddr)
| Read a byte from Slave. More...
uint32_t | UI2C_ReadMultiBytes (UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t *rdata, uint32_t u32rLen)
| Read multi bytes from Slave. More...
uint8_t | UI2C_ReadByteOneReg (UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr)
| Specify a byte register address and read a byte from Slave. More...
uint32_t | UI2C_ReadMultiBytesOneReg (UI2C_T *ui2c, uint8_t u8SlaveAddr, uint8_t u8DataAddr, uint8_t *rdata, uint32_t u32rLen)
| Specify a byte register address and read multi bytes from Slave. More...
uint8_t | UI2C_ReadByteTwoRegs (UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr)
| Specify two bytes register address and read a byte from Slave. More...
uint32_t | UI2C_ReadMultiBytesTwoRegs (UI2C_T *ui2c, uint8_t u8SlaveAddr, uint16_t u16DataAddr, uint8_t *rdata, uint32_t u32rLen)
| Specify two bytes register address and read multi bytes from Slave. More...

## Detailed Description

M480 series USCI I2C(UI2C) driver source file.

Version
  V3.00 SPDX-License-Identifier: Apache-2.0

Copyright
  (C) 2016-2020 Nuvoton Technology Corp. All rights reserved.

Definition in file usci_i2c.c.