Mirror with some correction

Dependencies:   mbed FastIO FastPWM USBDevice

Committer:
arnoz
Date:
Fri Oct 01 08:19:46 2021 +0000
Revision:
116:7a67265d7c19
Parent:
76:7f5912b6340e
- Correct information regarding your last merge

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mjr 74:822a92bc11d2 1 // Pinscape Controller diagnostics
mjr 74:822a92bc11d2 2
mjr 74:822a92bc11d2 3 // Enable/disable diagnostics.
mjr 74:822a92bc11d2 4 //
mjr 74:822a92bc11d2 5 // Set to non-zero to enable diagnostics and performance counters.
mjr 74:822a92bc11d2 6 // The counters can generally be queried via the QUERY VARIABLE
mjr 74:822a92bc11d2 7 // protocol message, using variable 220. See USBProtocol.h for
mjr 74:822a92bc11d2 8 // details.
mjr 74:822a92bc11d2 9 //
mjr 74:822a92bc11d2 10 // The diagnostic counters add a little run-time overhead, so we
mjr 74:822a92bc11d2 11 // generally disable them in release builds. They're meant mostly for
mjr 74:822a92bc11d2 12 // development and debugging purposes, since there's not usually
mjr 74:822a92bc11d2 13 // anything you can do in terms of configuration that would affect
mjr 74:822a92bc11d2 14 // them. They're mostly a function of the structure of the firmware
mjr 74:822a92bc11d2 15 // code, so they can be useful when working on the code for things
mjr 74:822a92bc11d2 16 // like checking for timing bottlenecks.
mjr 74:822a92bc11d2 17 //
mjr 74:822a92bc11d2 18 // Note that you can view the diagnostics via the Windows config tool,
mjr 74:822a92bc11d2 19 // if they're enabled. If it finds valid values, it displays them on
mjr 74:822a92bc11d2 20 // the front page, in the device listing section. It doesn't mention
mjr 74:822a92bc11d2 21 // the diagnostics if they're missing, since that's the normal case.
mjr 74:822a92bc11d2 22 //
mjr 76:7f5912b6340e 23 #define ENABLE_DIAGNOSTICS 0
mjr 74:822a92bc11d2 24
mjr 74:822a92bc11d2 25
mjr 74:822a92bc11d2 26 // cover code with this to enable only when diagnostics are on
mjr 74:822a92bc11d2 27 #if ENABLE_DIAGNOSTICS
mjr 74:822a92bc11d2 28 # define IF_DIAG(code) code
mjr 74:822a92bc11d2 29 #else
mjr 74:822a92bc11d2 30 # define IF_DIAG(code)
mjr 74:822a92bc11d2 31 #endif