An I/O controller for virtual pinball machines: accelerometer nudge sensing, analog plunger input, button input encoding, LedWiz compatible output controls, and more.

Dependencies:   mbed FastIO FastPWM USBDevice

Fork of Pinscape_Controller by Mike R

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers diags.h Source File

diags.h

00001 // Pinscape Controller diagnostics
00002 
00003 // Enable/disable diagnostics.
00004 //
00005 // Set to non-zero to enable diagnostics and performance counters.
00006 // The counters can generally be queried via the QUERY VARIABLE
00007 // protocol message, using variable 220.  See USBProtocol.h for
00008 // details.
00009 //
00010 // The diagnostic counters add a little run-time overhead, so we
00011 // generally disable them in release builds.  They're meant mostly for
00012 // development and debugging purposes, since there's not usually
00013 // anything you can do in terms of configuration that would affect
00014 // them.  They're mostly a function of the structure of the firmware
00015 // code, so they can be useful when working on the code for things
00016 // like checking for timing bottlenecks.
00017 //
00018 // Note that you can view the diagnostics via the Windows config tool,
00019 // if they're enabled.  If it finds valid values, it displays them on 
00020 // the front page, in the device listing section.  It doesn't mention
00021 // the diagnostics if they're missing, since that's the normal case.
00022 //
00023 #define ENABLE_DIAGNOSTICS  0
00024 
00025 
00026 // cover code with this to enable only when diagnostics are on
00027 #if ENABLE_DIAGNOSTICS
00028 # define IF_DIAG(code)  code
00029 #else
00030 # define IF_DIAG(code)
00031 #endif