Adafruit_FRAM_SPI icon indicating copy to clipboard operation
Adafruit_FRAM_SPI copied to clipboard

conditional compile debug output

Open udo-munk opened this issue 9 months ago • 0 comments

When using the library I get debug output to the terminal, which is unwanted for 2 reasons:

  1. it screws up the terminal output of my application
  2. 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.

udo-munk avatar May 13 '24 08:05 udo-munk