From 4e93b3fa67d3b8170de2f05322738e08ac17948e Mon Sep 17 00:00:00 2001 From: tmk Date: Sun, 7 Apr 2013 15:36:50 +0900 Subject: Fix bootmagic and eeconfig for virtual DIP SW --- common/debug.h | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'common/debug.h') diff --git a/common/debug.h b/common/debug.h index e16ea14af4..cac682703d 100644 --- a/common/debug.h +++ b/common/debug.h @@ -79,10 +79,26 @@ along with this program. If not, see . extern "C" { #endif -extern bool debug_enable; -extern bool debug_matrix; -extern bool debug_keyboard; -extern bool debug_mouse; + +/* NOTE: Not portable. Bit field order depends on implementation */ +typedef union { + uint8_t raw; + struct { + bool enable:1; + bool matrix:1; + bool keyboard:1; + bool mouse:1; + uint8_t reserved:4; + }; +} debug_config_t; +debug_config_t debug_config; + +/* for backward compatibility */ +#define debug_enable (debug_config.enable) +#define debug_matrix (debug_config.matrix) +#define debug_keyboard (debug_config.keyboard) +#define debug_mouse (debug_config.mouse) + #ifdef __cplusplus } -- cgit v1.2.3