This is an old revision of the document!
Read data from the simulated SRAM heap.
from cubloc import HRead HRead( address: int, byteLength: int, returnType: type[int] | type[float] | type[bytes] | type[bytearray] = int, )
Heap address (0 to 56319).
Returns the heap data decoded according to returnType as int, float, bytes, or bytearray.
address or byteLength is out of range, the read would extend past the end of heap, or a float read was requested with a byteLength other than 4.from cubloc import HRead # Example usage result = HRead(1, 1, int) print(result)