]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - tmk_core/common/report.h
Keyboard: Fix the LAYOUT_iso macro for tada68 (#3943)
[qmk_firmware.git] / tmk_core / common / report.h
index a0811f9a3c8d20f8fade80a9b0eed2078adf3cad..167f382751e9dadf5724bbc0293dc3b67f783fff 100644 (file)
@@ -73,22 +73,25 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 /* key report size(NKRO or boot mode) */
-#if defined(PROTOCOL_PJRC) && defined(NKRO_ENABLE)
-#   include "usb.h"
-#   define KEYBOARD_REPORT_SIZE KBD2_SIZE
-#   define KEYBOARD_REPORT_KEYS (KBD2_SIZE - 2)
-#   define KEYBOARD_REPORT_BITS (KBD2_SIZE - 1)
-
-#elif defined(PROTOCOL_LUFA) && defined(NKRO_ENABLE)
-#   include "protocol/lufa/descriptor.h"
-#   define KEYBOARD_REPORT_SIZE NKRO_EPSIZE
-#   define KEYBOARD_REPORT_KEYS (NKRO_EPSIZE - 2)
-#   define KEYBOARD_REPORT_BITS (NKRO_EPSIZE - 1)
-#elif defined(PROTOCOL_CHIBIOS) && defined(NKRO_ENABLE)
-#   include "protocol/chibios/usb_main.h"
-#   define KEYBOARD_REPORT_SIZE NKRO_EPSIZE
-#   define KEYBOARD_REPORT_KEYS (NKRO_EPSIZE - 2)
-#   define KEYBOARD_REPORT_BITS (NKRO_EPSIZE - 1)
+#if defined(NKRO_ENABLE)
+  #if defined(PROTOCOL_PJRC)
+    #include "usb.h"
+    #define KEYBOARD_REPORT_SIZE KBD2_SIZE
+    #define KEYBOARD_REPORT_KEYS (KBD2_SIZE - 2)
+    #define KEYBOARD_REPORT_BITS (KBD2_SIZE - 1)
+  #elif defined(PROTOCOL_LUFA) || defined(PROTOCOL_CHIBIOS)
+    #include "protocol/usb_descriptor.h"
+    #define KEYBOARD_REPORT_SIZE NKRO_EPSIZE
+    #define KEYBOARD_REPORT_KEYS (NKRO_EPSIZE - 2)
+    #define KEYBOARD_REPORT_BITS (NKRO_EPSIZE - 1)
+  #elif defined(PROTOCOL_ARM_ATSAM)
+    #include "protocol/arm_atsam/usb/udi_device_epsize.h"
+    #define KEYBOARD_REPORT_SIZE NKRO_EPSIZE
+    #define KEYBOARD_REPORT_KEYS (NKRO_EPSIZE - 2)
+    #define KEYBOARD_REPORT_BITS (NKRO_EPSIZE - 1)
+  #else
+    #error "NKRO not supported with this protocol"
+#endif
 
 #else
 #   define KEYBOARD_REPORT_SIZE 8