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

Next revision
Previous revision
logicpython:cubloc_api:eeread [2026/04/10 02:06] – created - external edit 127.0.0.1logicpython:cubloc_api:eeread [2026/04/14 05:14] (current) – [Return Value] mfranklin
Line 1: Line 1:
 ====== EERead ====== ====== EERead ======
  
-Read bytes from per-''address'' backing files named like _ee_0000.+Read data from non-volatile memory. 
 + 
 +This feature is supported only on models with built-in FRAM.
  
 ===== Syntax ===== ===== Syntax =====
Line 8: Line 10:
 from cubloc import EERead from cubloc import EERead
  
-EERead( address: int, byteLength: int, returnType: type[int] | type[float] | type[bytes] | type[bytearray] = int)+EERead(address: int, 
 +    byteLength: int,  
 +    returnType: type[int] | type[float] | type[bytes] | type[bytearray] = int)
 </code> </code>
  
Line 14: Line 18:
  
   * **address**: EEPROM ''address'' (0 to 4095).   * **address**: EEPROM ''address'' (0 to 4095).
-  * **byteLength**: Number of bytes to read. Must be positive and remain within the EEPROM bounds. +  * **byteLength**: Number of bytes to read. Must be positive and remain within the non-volatile memory'bounds. 
-  * **returnType**: Use int, float, bytes, or bytearray to control how the EEPROM bytes are decoded. The default is int.+  * **returnType**: Use ''int''''float''''bytes'', or ''bytearray'' to control how the data is decoded. The default is ''int''.
  
 ===== Return Value ===== ===== Return Value =====
  
-Returns the EEPROM data decoded according to ''returnType'' as int, float, bytes, or bytearray.+Returns the data according to ''returnType'' as ''int''''float''''bytes'', or ''bytearray''.
  
 ===== Exceptions ===== ===== 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#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.+  * [[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 ===== ===== Example =====
Line 39: Line 43:
  
   * [[logicpython:cubloc_api:eewrite|EEWrite]]   * [[logicpython:cubloc_api:eewrite|EEWrite]]
-  * [[logicpython:cubloc_api:heap|Heap]] 
-  * [[logicpython:cubloc_api:heapclear|HeapClear]] 
-  * [[logicpython:cubloc_api:heapw|HeapW]] 
-  * [[logicpython:cubloc_api:hread|HRead]] 
  
logicpython/cubloc_api/eeread.1775786798.txt.gz · Last modified: by 127.0.0.1