-
Notifications
You must be signed in to change notification settings - Fork 1
fillMemory()
Arnd edited this page Dec 11, 2020
·
2 revisions
The begin() function searches for all available I2C MB85nnn memories and combines them to form one large contiguous memory. The "data" parameter can be any data type including arrays and structures and the memory will be filled with as many copies of "data" that fit, any remaining bytes at the end of memory that remain are left untouched. The optional return value holds the number of copies of "data" written. The function works much faster when larger structures are used than when single bytes or words are written.
###Example
MB85_FRAM_Class FRAM;
...
uint8_t chips_detected = FRAM.begin(); // return number of memories
uint8_t emptyArray[32] = {0};
FRAM.fillMemory(emptyArray);
Serial.println("Wrote 0x00 to all memory addresses");
...