adafruit_24lc32
¶
CircuitPython driver for Adafruit 24LC32 I2C EEPROM Breakout
Author(s): Tim Cocks
Implementation Notes¶
Hardware:
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
# * Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice # * Adafruit’s Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
- class adafruit_24lc32.EEPROM(max_size: int, write_protect: bool = False, wp_pin: DigitalInOut | None = None)¶
Driver base for the EEPROM Breakout.
- Parameters:
- property write_protected: bool¶
The status of write protection. Default value on initialization is
False
.When a
WP
pin is supplied during initialization, or usingwrite_protect_pin
, the status is tied to that pin and enables hardware-level protection.When no
WP
pin is supplied, protection is only at the software level in this library.
- class adafruit_24lc32.EEPROM_I2C(i2c_bus: busio.I2C, address: int = 80, write_protect: bool = False, wp_pin: DigitalInOut | None = None, max_size: int = 4096)¶
I2C class for EEPROM.
- Parameters:
i2c_bus (I2C) – The I2C bus the EEPROM is connected to.
address (int) – I2C address of EEPROM. Default address is
0x50
.write_protect (bool) – Turns on/off initial write protection. Default is
False
.wp_pin – (Optional) Physical pin connected to the
WP
breakout pin. Must be aDigitalInOut
object.max_int – (Optional) Maximum # bytes stored in the EEPROM. Default is
_MAX_SIZE_I2C
- property write_protected: bool¶
The status of write protection. Default value on initialization is
False
.When a
WP
pin is supplied during initialization, or usingwrite_protect_pin
, the status is tied to that pin and enables hardware-level protection.When no
WP
pin is supplied, protection is only at the software level in this library.