@@ -84,21 +84,21 @@ def __len__(self):
84
84
"""The size of the current EEPROM chip. This is one more than the highest
85
85
address location that can be read or written to.
86
86
.. code-block:: python
87
- fram = adafruit_fram.FRAM_xxx() # xxx = 'I2C' or 'SPI'
87
+ eeprom = adafruit_24lc32.EEPROM_I2C()
88
88
# size returned by len()
89
- len(fram )
89
+ len(eeprom )
90
90
# can be used with range
91
- for i in range(0, len(fram ))
91
+ for i in range(0, len(eeprom ))
92
92
"""
93
93
return self ._max_size
94
94
95
95
def __getitem__ (self , address ):
96
96
"""Read the value at the given index, or values in a slice.
97
97
.. code-block:: python
98
98
# read single index
99
- fram [0]
99
+ eeprom [0]
100
100
# read values 0 thru 9 with a slice
101
- fram [0:9]
101
+ eeprom [0:9]
102
102
"""
103
103
if isinstance (address , int ):
104
104
if not 0 <= address < self ._max_size :
@@ -134,12 +134,12 @@ def __setitem__(self, address, value):
134
134
"""Write the value at the given starting index.
135
135
.. code-block:: python
136
136
# write single index
137
- fram [0] = 1
137
+ eeprom [0] = 1
138
138
# write values 0 thru 4 with a list
139
- fram [0:4] = [0,1,2,3]
139
+ eeprom [0:4] = [0,1,2,3]
140
140
"""
141
141
if self .write_protected :
142
- raise RuntimeError ("FRAM currently write protected." )
142
+ raise RuntimeError ("EEPROM currently write protected." )
143
143
144
144
if isinstance (address , int ):
145
145
if not isinstance (value , int ):
@@ -230,7 +230,7 @@ def _write(self, start_address, data, wraparound=False):
230
230
else :
231
231
raise ValueError (
232
232
"Starting address + data length extends beyond"
233
- " FRAM maximum address. Use ``write_wraparound`` to"
233
+ " EEPROM maximum address. Use ``write_wraparound`` to"
234
234
" override this warning."
235
235
)
236
236
with self ._i2c as i2c :
0 commit comments