3      Copyright (C) Dean Camera, 2015. 
   5   dean [at] fourwalledcubicle [dot] com 
  10   Copyright 2015  Dean Camera (dean [at] fourwalledcubicle [dot] com) 
  12   Permission to use, copy, modify, distribute, and sell this 
  13   software and its documentation for any purpose is hereby granted 
  14   without fee, provided that the above copyright notice appear in 
  15   all copies and that both that the copyright notice and this 
  16   permission notice and warranty disclaimer appear in supporting 
  17   documentation, and that the name of the author not be used in 
  18   advertising or publicity pertaining to distribution of the 
  19   software without specific, written prior permission. 
  21   The author disclaims all warranties with regard to this 
  22   software, including all implied warranties of merchantability 
  23   and fitness.  In no event shall the author be liable for any 
  24   special, indirect or consequential damages or any damages 
  25   whatsoever resulting from loss of use, data or profits, whether 
  26   in an action of contract, negligence or other tortious action, 
  27   arising out of or in connection with the use or performance of 
  31 #include <LUFA/Common/Common.h> 
  32 #include <LUFA/Drivers/Board/Board.h> 
  33 #include <LUFA/Drivers/Board/Buttons.h> 
  34 #include <LUFA/Drivers/Board/Dataflash.h> 
  35 #include <LUFA/Drivers/Board/LEDs.h> 
  36 #include <LUFA/Drivers/Board/Joystick.h> 
  38 #if defined(BOARD_HAS_BUTTONS) == defined(BOARD_DUMMY_BUTTONS_IMPLEMENTATION) 
  39         #error Mismatch between BOARD_HAS_BUTTONS and implementation. 
  42 #if defined(BOARD_HAS_DATAFLASH) == defined(BOARD_DUMMY_DATAFLASH_IMPLEMENTATION) 
  43         #error Mismatch between BOARD_HAS_DATAFLASH and implementation. 
  46 #if defined(BOARD_HAS_LEDS) == defined(BOARD_DUMMY_LEDS_IMPLEMENTATION) 
  47         #error Mismatch between BOARD_HAS_LEDS and implementation. 
  50 #if defined(BOARD_HAS_JOYSTICK) == defined(BOARD_DUMMY_JOYSTICK_IMPLEMENTATION) 
  51         #error Mismatch between BOARD_HAS_JOYSTICK and implementation. 
  58         /* ============================= 
  59          *     Buttons Compile Check 
  60          * ============================= */ 
  61         // cppcheck-suppress redundantAssignment 
  62         Dummy 
= BUTTONS_BUTTON1
; 
  64         // cppcheck-suppress redundantAssignment 
  65         Dummy 
= Buttons_GetStatus(); 
  68         /* ============================= 
  69          *    Dataflash Compile Check 
  70          * ============================= */ 
  71         // cppcheck-suppress redundantAssignment 
  72         Dummy 
= DATAFLASH_TOTALCHIPS 
+ DATAFLASH_NO_CHIP 
+ DATAFLASH_CHIP1 
+ DATAFLASH_PAGE_SIZE 
+ DATAFLASH_PAGES
; 
  74         Dataflash_TransferByte(0); 
  75         Dataflash_SendByte(0); 
  76         // cppcheck-suppress redundantAssignment 
  77         Dummy 
= Dataflash_ReceiveByte(); 
  78         // cppcheck-suppress redundantAssignment 
  79         Dummy 
= Dataflash_GetSelectedChip(); 
  80         Dataflash_SelectChip(DATAFLASH_CHIP1
); 
  81         Dataflash_DeselectChip(); 
  82         Dataflash_SelectChipFromPage(0); 
  83         Dataflash_ToggleSelectedChipCS(); 
  84         Dataflash_WaitWhileBusy(); 
  85         Dataflash_SendAddressBytes(0, 0); 
  87         /* ============================= 
  89          * ============================= */ 
  90         // cppcheck-suppress redundantAssignment 
  91         Dummy 
= LEDS_LED1 
+ LEDS_LED2 
+ LEDS_LED3 
+ LEDS_LED4
; 
  93         LEDs_TurnOnLEDs(LEDS_ALL_LEDS
); 
  94         LEDs_TurnOffLEDs(LEDS_ALL_LEDS
); 
  95         LEDs_SetAllLEDs(LEDS_ALL_LEDS
); 
  96         LEDs_ChangeLEDs(LEDS_ALL_LEDS
, LEDS_NO_LEDS
); 
  97         LEDs_ToggleLEDs(LEDS_ALL_LEDS
); 
  98         // cppcheck-suppress redundantAssignment 
  99         Dummy 
= LEDs_GetLEDs(); 
 102         /* ============================= 
 103          *     Joystick Compile Check 
 104          * ============================= */ 
 105         // cppcheck-suppress redundantAssignment 
 106         Dummy 
= JOY_LEFT 
+ JOY_RIGHT 
+ JOY_UP 
+ JOY_DOWN 
+ JOY_PRESS
; 
 108         // cppcheck-suppress redundantAssignment 
 109         Dummy 
= Joystick_GetStatus();