Adafruit_FRAM_SPI
Adafruit_FRAM_SPI copied to clipboard
conditional compile debug output
When using the library I get debug output to the terminal, which is unwanted for 2 reasons:
- it screws up the terminal output of my application
- it needs memory space which is very spare in my project.
My application looks like this:
//#define DEBUG // enables some debug messages
#include <SPI.h> #include "Adafruit_FRAM_SPI.h"
.... ....
void setup() { if (!fram.begin(FRAM_ADDR_SIZE)) { Serial.println(F("No FRAM found")); exit(1); } ... ... }
So if I should run into problems with the FRAM module I can enable additional DEBUG output to see what happens. But only then and not in the production version of the software.