Skip to content

fillMemory()

Arnd edited this page Dec 3, 2016 · 3 revisions

fillMemory ( address , data )

The fillMemory function will fill memory, starting at location address with data. It will not wrap around past the end and if, for example, there only 10 bytes left and the data to write is 12 bytes long it will not write to those last 10 bytes.


###Example

const uint8_t CS_PIN = 8;        // define the CS/SS Pin used for SPI
MicrochipSRAM sram(CS_PIN);      // Instantiate the class
char myText[12] = "Hello World"; // Text string to write to memory
sram.fillMemory(0,myText);       // Write characters to memory
sram.get(12,myText);             // Read from memory
Serial.print("Data is \"");      // Display results
Serial.print(myText);
Serial.println("\"");

Overview

Overview
Installation
Class Instantiation

Public Functions

get()
put()
clearMemory()
fillMemory()

Public Variables

SRAMBytes

Example Program

sram_read_write_test

Clone this wiki locally