class documentation

class PSRAMObject(picoware_psram.Object):

View In Hierarchy

Python wrapper around the underlying C PSRAM object.

Behaves like the original Python type (str, int, float, bytes, bytearray, dict, bool, function, list, or tuple) but stores its data in PSRAM memory. Memory management is automatic: when a PSRAMObject is garbage collected, its associated PSRAM memory is freed.

Methods

  • __str__()
    Return string representation of the PSRAM object.
  • __del__()
    Automatically free PSRAM memory when the object is garbage collected.
  • value()
    Get the value stored in PSRAM, automatically converting it back to the original Python type.
  • length()
    Get the length of the data stored in PSRAM (for strings, bytes, lists, etc.).
  • addr()
    Get the PSRAM memory address where the data is stored .