The Pedigree Project  0.1
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
I2C Class Reference
+ Collaboration diagram for I2C:

Public Member Functions

void initialise (uintptr_t baseAddr)
 
bool transmit (uint8_t addr, uintptr_t buffer, size_t len)
 
bool receive (uint8_t addr, uintptr_t buffer, size_t maxlen)
 
bool write (uint8_t addr, uint8_t reg, uint8_t data)
 
uint8_t read (uint8_t addr, uint8_t reg)
 

Static Public Member Functions

static I2Cinstance (size_t n)
 

Private Types

enum  Registers {
  I2C_REV = 0x00 / 2, I2C_IE = 0x04 / 2, I2C_STAT = 0x08 / 2, I2C_WE = 0x0C / 2,
  I2C_SYSS = 0x10 / 2, I2C_BUF = 0x14 / 2, I2C_CNT = 0x18 / 2, I2C_DATA = 0x1C / 2,
  I2C_SYSC = 0x20 / 2, I2C_CON = 0x24 / 2, I2C_OA0 = 0x28 / 2, I2C_SA = 0x2C / 2,
  I2C_PSC = 0x30 / 2, I2C_SCLL = 0x34 / 2, I2C_SCLH = 0x38 / 2, I2C_SYSTEST = 0x3C / 2,
  I2C_BUFSTAT = 0x40 / 2, I2C_OA1 = 0x44 / 2, I2C_OA2 = 0x48 / 2, I2C_OA3 = 0x4C / 2,
  I2C_ACTOA = 0x50 / 2, I2C_SBLOCK = 0x54 / 2
}
 

Private Member Functions

void waitForBus ()
 

Private Attributes

MemoryRegion m_MmioBase
 

Static Private Attributes

static I2C m_Instance [3]
 

Detailed Description

Definition at line 26 of file I2C.h.


The documentation for this class was generated from the following files: