# include/mios32/mios32_iic.h File Reference

## Defines
#define | MIOS32_IIC_NUM 1
#define | MIOS32_IIC0_BUS_FREQUENCY 400000
#define | MIOS32_IIC1_BUS_FREQUENCY 400000
#define | MIOS32_IIC2_BUS_FREQUENCY 400000
#define | MIOS32_IIC_TIMEOUT_VALUE 5000
#define | MIOS32_IIC_ERROR_INVALID_PORT -1
#define | MIOS32_IIC_ERROR_GENERAL -2
#define | MIOS32_IIC_ERROR_UNSUPPORTED_TRANSFER_TYPE -3
#define | MIOS32_IIC_ERROR_TIMEOUT -4
#define | MIOS32_IIC_ERROR_ARBITRATION_LOST -5
#define | MIOS32_IIC_ERROR_BUS -6
#define | MIOS32_IIC_ERROR_SLAVE_NOT_CONNECTED -7
#define | MIOS32_IIC_ERROR_UNEXPECTED_EVENT -8
#define | MIOS32_IIC_ERROR_RX_BUFFER_OVERRUN -9
#define | MIOS32_IIC_ERROR_PREV_OFFSET -128
## Enumerations
enum | mios32_iic_semaphore_t { IIC_Blocking, IIC_Non_Blocking }
enum | mios32_iic_transfer_t { IIC_Read, IIC_Write, IIC_Read_AbortIfFirstByteIs0, IIC_Write_WithoutStop }
## Functions
s32 | MIOS32_IIC_Init (u32 mode)
s32 | MIOS32_IIC_TransferBegin (u8 iic_port, mios32_iic_semaphore_t semaphore_type)
s32 | MIOS32_IIC_TransferFinished (u8 iic_port)
s32 | MIOS32_IIC_Transfer (u8 iic_port, mios32_iic_transfer_t transfer, u8 address, u8 *buffer, u16 len)
s32 | MIOS32_IIC_TransferCheck (u8 iic_port)
s32 | MIOS32_IIC_TransferWait (u8 iic_port)
s32 | MIOS32_IIC_LastErrorGet (u8 iic_port)

## Define Documentation

#define MIOS32_IIC0_BUS_FREQUENCY 400000

#define MIOS32_IIC1_BUS_FREQUENCY 400000

#define MIOS32_IIC2_BUS_FREQUENCY 400000

#define MIOS32_IIC_ERROR_ARBITRATION_LOST -5

#define MIOS32_IIC_ERROR_BUS -6

#define MIOS32_IIC_ERROR_GENERAL -2

#define MIOS32_IIC_ERROR_INVALID_PORT -1

#define MIOS32_IIC_ERROR_PREV_OFFSET -128

#define MIOS32_IIC_ERROR_RX_BUFFER_OVERRUN -9

#define MIOS32_IIC_ERROR_SLAVE_NOT_CONNECTED -7

#define MIOS32_IIC_ERROR_TIMEOUT -4

#define MIOS32_IIC_ERROR_UNEXPECTED_EVENT -8

#define MIOS32_IIC_ERROR_UNSUPPORTED_TRANSFER_TYPE -3

#define MIOS32_IIC_NUM 1

#define MIOS32_IIC_TIMEOUT_VALUE 5000

## Enumeration Type Documentation

enum mios32_iic_semaphore_t

Enumerator:

  IIC_Blocking |
  IIC_Non_Blocking |

enum mios32_iic_transfer_t

Enumerator:

  IIC_Read |
  IIC_Write |
  IIC_Read_AbortIfFirstByteIs0 |
  IIC_Write_WithoutStop |