KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dev_i2c.h File Reference

This provides a device mapping for the OpenCores I2C peripheral. More...

#include "dev_defs.h"

Go to the source code of this file.

Data Structures

struct  I2C_Device
 Structure defines OpenCores I2C Device. More...
 

Macros

#define SDB_ID_I2C   0x6B9456E4
 SDB ID I2C.
 
#define I2C_CMD_IACK   BIT(0)
 I2C ACK interrupt.
 
#define I2C_CMD_ACK   BIT(3)
 Though bit is named ACK, its really NACK when set to 1.
 
#define I2C_CMD_WR   BIT(4)
 Write command.
 
#define I2C_CMD_RD   BIT(5)
 Read command.
 
#define I2C_CMD_STOP   BIT(6)
 Issue stop.
 
#define I2C_CMD_START   BIT(7)
 Issue start.
 
#define I2C_STS_IRQ   BIT(0)
 IRQ raised.
 
#define I2C_STS_TIP   BIT(1)
 Transfer in progress.
 
#define I2C_STS_ARBLOST   BIT(5)
 Arbitration lost.
 
#define I2C_STS_BUSY   BIT(6)
 Is busy.
 
#define I2C_STS_RXACK   BIT(7)
 Not Acknowledge receive.
 
#define I2C_CTL_INT_ENA   BIT(6)
 Enable interrupts.
 
#define I2C_CTL_CORE_ENA   BIT(7)
 Enable core.
 
#define I2C_IF_NO_MASK   0x0F
 Interface number mask.
 
#define I2C_IF_NO_SHIFT   0
 Interface no shift.
 
#define I2C_IF_BUSY   BIT(7)
 Busy bit (software programmable)
 

Detailed Description

This provides a device mapping for the OpenCores I2C peripheral.

Definition in file dev_i2c.h.