Skip to content

memSize()

Arnd edited this page Oct 14, 2018 · 2 revisions

memSize(memory_number)

This function will return the total number of bytes available on the memory_number index, which starts at 0. Any invalid index results in a size of 0 being returned.


###Example

MB85_FRAM_Class FRAM;
...
uint8_t chips_detected = FRAM.begin(); // return number of memories
Serial.print("Found ");
Serial.print(chips_detected);
Serial.println(" MB85nnn memory chips");
for(uint8_t i=0;i<chips_detected;i++) {
  Serial.print("Memory ");
  Serial.print(i);
  Serial.print(" has ");
  Serial.print(FRAM.memSize(i));
  Serial.println(" bytes capacity.");
} // of for-next each memory
...
Clone this wiki locally