jmce - 1_02

jmce.sim
Interface I2cSlave

All Superinterfaces:
Hardware
All Known Implementing Classes:
AT24C16

public interface I2cSlave
extends Hardware

Interface for I2c slave peripheral connected to the I2CBus.

Version:
1.00
Author:
Mario Viara
See Also:
I2cBus

Method Summary
 boolean i2cAddress(int address)
          Check if the address is managed by this peripheral
 int i2cRead(int count)
          Read one byte
 boolean i2cWrite(int count, int value)
          Write one byte.
 
Methods inherited from interface jmce.sim.Hardware
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, init, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName
 

Method Detail

i2cWrite

boolean i2cWrite(int count,
                 int value)
                 throws SIMException
Write one byte.

Throws:
SIMException

i2cRead

int i2cRead(int count)
            throws SIMException
Read one byte

Throws:
SIMException

i2cAddress

boolean i2cAddress(int address)
Check if the address is managed by this peripheral

Parameters:
address - - Address to check.
Returns:
true if the address is relative to this slave.

jmce - 1_02