-
Notifications
You must be signed in to change notification settings - Fork 2
fillMemory()
Arnd edited this page Dec 3, 2016
·
3 revisions
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("\"");