User Tools

Site Tools

한국어

logicpython:cubloc_api:eeread

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
logicpython:cubloc_api:eeread [2026/04/10 02:37] mfranklinlogicpython:cubloc_api:eeread [2026/05/15 05:27] (current) – removed mfranklin
Line 1: Line 1:
-====== EERead ====== 
- 
-Read bytes from per-''address'' backing files named like _ee_0000. 
- 
-===== Syntax ===== 
- 
-<code python> 
-from cubloc import EERead 
- 
-EERead( address: int, byteLength: int, returnType: type[int] | type[float] | type[bytes] | type[bytearray] = int, ) 
-</code> 
- 
-===== Parameters ===== 
- 
-  * **address**: EEPROM ''address'' (0 to 4095). 
-  * **byteLength**: Number of bytes to read. Must be positive and remain within the EEPROM bounds. 
-  * **returnType**: Use int, float, bytes, or bytearray to control how the EEPROM bytes are decoded. The default is int. 
- 
-===== Return Value ===== 
- 
-Returns the EEPROM data decoded according to ''returnType'' as int, float, bytes, or bytearray. 
- 
-===== Exceptions ===== 
- 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: ''address'', ''byteLength'', or ''returnType'' is invalid. 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#ValueError|ValueError]]: ''address'' or ''byteLength'' is out of range, the read would extend past ''address'' 4095, or a float read was requested with a ''byteLength'' other than 4. 
- 
-===== Example ===== 
- 
-<code python> 
-from cubloc import EERead 
- 
-# Example usage 
-result = EERead(1, 1, int) 
-print(result) 
-</code> 
- 
-===== Related APIs ===== 
- 
-  * [[logicpython:cubloc_api:eewrite|EEWrite]] 
  
logicpython/cubloc_api/eeread.1775788674.txt.gz · Last modified: by mfranklin