User Tools

Site Tools

한국어

logicpython:cubloc_api:eewrite

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:eewrite [2026/04/10 02:38] – [Related APIs] mfranklinlogicpython:cubloc_api:eewrite [2026/04/14 05:13] (current) mfranklin
Line 1: Line 1:
 ====== EEWrite ====== ====== EEWrite ======
  
-Write bytes into per-''address'' backing files named like _ee_0000.+Write data to non-volatile memory. 
 + 
 +This feature is supported only on models with built-in FRAM.
  
 ===== Syntax ===== ===== Syntax =====
Line 14: Line 16:
  
   * **address**: EEPROM ''address'' (0 to 4095).   * **address**: EEPROM ''address'' (0 to 4095).
-  * **data**: Integer, float, bytes, or bytearray value to write. +  * **data**: ''int''''float''''bytes'', or ''bytearray'' value to write. 
-  * **byteLength**: Number of bytes to write. Must be positive and remain within the EEPROM bounds. ''Float'' writes require 4. Bytes and bytearray writes use the first ''byteLength'' bytes.+  * **byteLength**: Number of bytes to write. Must be positive and remain within the non-volatile memory'bounds. ''Float'' writes require 4. ''bytes'' and ''bytearray'' writes use the first ''byteLength'' bytes.
  
 ===== Exceptions ===== ===== Exceptions =====
  
   * [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: ''address'', ''data'', or ''byteLength'' is invalid.   * [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: ''address'', ''data'', or ''byteLength'' is invalid.
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#ValueError|ValueError]]: ''address'' or ''byteLength'' is out of range, the write would extend past ''address'' 4095, a float write was requested with a ''byteLength'' other than 4, a float is not representable as a 32-bit value, or ''byteLength'' exceeds the source bytes length.+  * [[https://docs.micropython.org/en/latest/library/builtins.html#ValueError|ValueError]]: ''address'' or ''byteLength'' is out of range, the write would extend past ''address'' 4095, a ''float'' write was requested with a ''byteLength'' other than 4, a ''float'' is not representable as a 32-bit value, or ''byteLength'' exceeds the source bytes length.
  
 ===== Example ===== ===== Example =====
logicpython/cubloc_api/eewrite.1775788694.txt.gz · Last modified: by mfranklin