aboutsummaryrefslogtreecommitdiff
path: root/common/report.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/report.h')
-rw-r--r--common/report.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/common/report.h b/common/report.h
index 71543cc23..62190469a 100644
--- a/common/report.h
+++ b/common/report.h
@@ -74,19 +74,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
74/* key report size(NKRO or boot mode) */ 74/* key report size(NKRO or boot mode) */
75#if defined(PROTOCOL_PJRC) && defined(NKRO_ENABLE) 75#if defined(PROTOCOL_PJRC) && defined(NKRO_ENABLE)
76# include "usb.h" 76# include "usb.h"
77# define REPORT_SIZE KBD2_SIZE 77# define KEYBOARD_REPORT_SIZE KBD2_SIZE
78# define REPORT_KEYS (KBD2_SIZE - 2) 78# define KEYBOARD_REPORT_KEYS (KBD2_SIZE - 2)
79# define REPORT_BITS (KBD2_SIZE - 1) 79# define KEYBOARD_REPORT_BITS (KBD2_SIZE - 1)
80 80
81#elif defined(PROTOCOL_LUFA) && defined(NKRO_ENABLE) 81#elif defined(PROTOCOL_LUFA) && defined(NKRO_ENABLE)
82# include "protocol/lufa/descriptor.h" 82# include "protocol/lufa/descriptor.h"
83# define REPORT_SIZE NKRO_EPSIZE 83# define KEYBOARD_REPORT_SIZE NKRO_EPSIZE
84# define REPORT_KEYS (NKRO_EPSIZE - 2) 84# define KEYBOARD_REPORT_KEYS (NKRO_EPSIZE - 2)
85# define REPORT_BITS (NKRO_EPSIZE - 1) 85# define KEYBOARD_REPORT_BITS (NKRO_EPSIZE - 1)
86 86
87#else 87#else
88# define REPORT_SIZE 8 88# define KEYBOARD_REPORT_SIZE 8
89# define REPORT_KEYS 6 89# define KEYBOARD_REPORT_KEYS 6
90#endif 90#endif
91 91
92 92
@@ -115,16 +115,16 @@ extern "C" {
115 * 115 *
116 */ 116 */
117typedef union { 117typedef union {
118 uint8_t raw[REPORT_SIZE]; 118 uint8_t raw[KEYBOARD_REPORT_SIZE];
119 struct { 119 struct {
120 uint8_t mods; 120 uint8_t mods;
121 uint8_t reserved; 121 uint8_t reserved;
122 uint8_t keys[REPORT_KEYS]; 122 uint8_t keys[KEYBOARD_REPORT_KEYS];
123 }; 123 };
124#ifdef NKRO_ENABLE 124#ifdef NKRO_ENABLE
125 struct { 125 struct {
126 uint8_t mods; 126 uint8_t mods;
127 uint8_t bits[REPORT_BITS]; 127 uint8_t bits[KEYBOARD_REPORT_BITS];
128 } nkro; 128 } nkro;
129#endif 129#endif
130} __attribute__ ((packed)) report_keyboard_t; 130} __attribute__ ((packed)) report_keyboard_t;