Add stub functions to all board drivers, so that demos can be compiled with BOARD=NONE.

pull/1469/head
Dean Camera 12 years ago
parent 654baf7d60
commit 2bb012d4cb

@ -15,11 +15,13 @@
* - Library Applications: * - Library Applications:
* - Added new Printer class bootloader * - Added new Printer class bootloader
* - Added new Mass Storage class bootloader * - Added new Mass Storage class bootloader
* - Added XMEGA support for class driver device demos (where applicable)
* *
* <b>Changed:</b> * <b>Changed:</b>
* - Core: * - Core:
* - Updated the BUILD build system module to produce binary BIN files in addition to Intel HEX files * - Updated the BUILD build system module to produce binary BIN files in addition to Intel HEX files
* - Updated the Android Accessory Class to accept version 2 protocol devices (with version 1 functionality) * - Updated the Android Accessory Class to accept version 2 protocol devices (with version 1 functionality)
* - All board drivers now implement dummy functions and constants when BOARD is set to NONE
* *
* <b>Fixed:</b> * <b>Fixed:</b>
* - Core: * - Core:

@ -92,7 +92,9 @@
#include "../../Common/Common.h" #include "../../Common/Common.h"
#if (BOARD == BOARD_NONE) #if (BOARD == BOARD_NONE)
#error The Board Buttons driver cannot be used if the makefile BOARD option is not set. #define BUTTONS_BUTTON1 0
static inline void Buttons_Init(void) {};
static inline uint_reg_t Buttons_GetStatus(void) { return 0; };
#elif (BOARD == BOARD_USBKEY) #elif (BOARD == BOARD_USBKEY)
#include "AVR8/USBKEY/Buttons.h" #include "AVR8/USBKEY/Buttons.h"
#elif (BOARD == BOARD_STK525) #elif (BOARD == BOARD_STK525)

@ -220,7 +220,23 @@
/* Includes: */ /* Includes: */
#if (BOARD == BOARD_NONE) #if (BOARD == BOARD_NONE)
#error The Board Dataflash driver cannot be used if the makefile BOARD option is not set. #define DATAFLASH_TOTALCHIPS 0
#define DATAFLASH_NO_CHIP 0
#define DATAFLASH_CHIP1 0
#define DATAFLASH_PAGE_SIZE 0
#define DATAFLASH_PAGES 0
static inline void Dataflash_Init(void) {};
static inline uint8_t Dataflash_TransferByte(const uint8_t Byte) { return 0; };
static inline void Dataflash_SendByte(const uint8_t Byte) {};
static inline uint8_t Dataflash_ReceiveByte(void) { return 0; };
static inline uint8_t Dataflash_GetSelectedChip(void) { return 0; };
static inline void Dataflash_SelectChip(const uint8_t ChipMask) {};
static inline void Dataflash_DeselectChip(void) {};
static inline void Dataflash_SelectChipFromPage(const uint16_t PageAddress) {};
static inline void Dataflash_ToggleSelectedChipCS(void) {};
static inline void Dataflash_WaitWhileBusy(void) {};
static inline void Dataflash_SendAddressBytes(uint16_t PageAddress,
const uint16_t BufferByte) {};
#elif (BOARD == BOARD_USBKEY) #elif (BOARD == BOARD_USBKEY)
#include "AVR8/USBKEY/Dataflash.h" #include "AVR8/USBKEY/Dataflash.h"
#elif (BOARD == BOARD_STK525) #elif (BOARD == BOARD_STK525)

@ -100,7 +100,13 @@
#include "../../Common/Common.h" #include "../../Common/Common.h"
#if (BOARD == BOARD_NONE) #if (BOARD == BOARD_NONE)
#error The Board Joystick driver cannot be used if the makefile BOARD option is not set. #define JOY_UP 0
#define JOY_DOWN 0
#define JOY_LEFT 0
#define JOY_RIGHT 0
#define JOY_PRESS 0
static inline void Joystick_Init(void) {};
static inline uint_reg_t Joystick_GetStatus(void) { return 0; };
#elif (BOARD == BOARD_USBKEY) #elif (BOARD == BOARD_USBKEY)
#include "AVR8/USBKEY/Joystick.h" #include "AVR8/USBKEY/Joystick.h"
#elif (BOARD == BOARD_STK525) #elif (BOARD == BOARD_STK525)

Loading…
Cancel
Save