I2cEeprom¶
Description¶
The I2cEeprom object implements a driver for I2C-based EEPROMs, usually referred to as AT24 or similar. The data in the EEPROM can be mapped into the data property
This object was introduced in InCore 2.0.
› Inherits: | I2cDevice |
---|
Properties¶
data¶
This property holds a mapped data buffer containing the EEPROM data starting from dataAddress. It’s cached and only read again whenever dataAddress or dataSize are changed.
› Type: | ByteArray |
---|---|
› Signal: | dataChanged() |
› Attributes: | Readonly |
Methods¶
read(UnsignedInteger startAddress, UnsignedInteger bytes)¶
This method reads – starting from a given address – the specified number of bytes from the EEPROM.
› Returns: | ArrayBuffer |
---|
Example¶
import InCore.Foundation 2.5
import InCore.IO 2.5
Application {
FtdiI2cBus {
I2cEeprom {
id: eeprom
address: 0x50
dataAddress: 0x0
dataSize: 16
}
}
onCompleted: console.log(eeprom.data.hex)
}