Package com.diozero.devices
Class McpEeprom
- java.lang.Object
-
- com.diozero.devices.McpEeprom
-
- All Implemented Interfaces:
DeviceInterface
,AutoCloseable
public class McpEeprom extends Object implements DeviceInterface
See the Microchip website. Datasheet. Connections:Notch GND A0 1 8 Vcc 3v3 GND A1 2 7 WP (Write Protect Input, Vss=write enabled, Vcc=write disabled) GND A2 3 6 SCL GND Vss 4 5 SDA
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
McpEeprom.Type
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_ADDRESS
-
Constructor Summary
Constructors Constructor Description McpEeprom(int controller, int address, McpEeprom.Type type)
McpEeprom(int controller, McpEeprom.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close this deviceint
getMemorySizeByte()
McpEeprom.Type
getType()
byte
readByte(int address)
byte[]
readBytes(int address, int length)
byte
readCurrentAddress()
void
writeByte(int address, byte data)
void
writeByte(int address, int data)
void
writeBytes(int address, byte[] data)
-
-
-
Field Detail
-
DEFAULT_ADDRESS
public static final int DEFAULT_ADDRESS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
McpEeprom
public McpEeprom(int controller, McpEeprom.Type type)
-
McpEeprom
public McpEeprom(int controller, int address, McpEeprom.Type type)
-
-
Method Detail
-
getType
public McpEeprom.Type getType()
-
getMemorySizeByte
public int getMemorySizeByte()
-
readCurrentAddress
public byte readCurrentAddress()
-
readByte
public byte readByte(int address)
-
readBytes
public byte[] readBytes(int address, int length)
-
writeByte
public void writeByte(int address, int data)
-
writeByte
public void writeByte(int address, byte data)
-
writeBytes
public void writeBytes(int address, byte[] data)
-
close
public void close()
Description copied from interface:DeviceInterface
Close this device- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceDeviceInterface
-
-