From daa2128252d0efa14b84352ceab9e1ec748ad975 Mon Sep 17 00:00:00 2001 From: Scott Allen Date: Tue, 1 Mar 2016 16:19:27 -0500 Subject: [PATCH] Add a #define for the library version --- src/Arduboy.h | 10 ++++++++-- src/core/core.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Arduboy.h b/src/Arduboy.h index f9f7c97..0429abd 100644 --- a/src/Arduboy.h +++ b/src/Arduboy.h @@ -6,6 +6,12 @@ #include #include +// Library version. +// For a version number in the form of x.y.z the value of the define will be +// ((x * 10000) + (y * 100) + (z)) as a decimal number. +// So, it will read as xxxyyzz, with no leading zeros on x. +#define ARDUBOY_LIB_VER 10200 + // EEPROM settings #define EEPROM_VERSION 0 #define EEPROM_BRIGHTNESS 1 @@ -63,7 +69,7 @@ public: */ // void boot(); // defined in core.cpp - void start() __attribute__ ((deprecated("use begin() instead"))); + void start() __attribute__((deprecated)) __attribute__ ((warning("use begin() instead"))); /// Scrolls in the Arduboy logo void bootLogo(); @@ -79,7 +85,7 @@ public: /// Clears display. void clear(); - void clearDisplay() __attribute__ ((deprecated("use clear() instead"))); + void clearDisplay() __attribute__((deprecated)) __attribute__ ((warning("use clear() instead"))); /// Copies the contents of the screen buffer to the screen. /** diff --git a/src/core/core.h b/src/core/core.h index a433920..966e40e 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -182,7 +182,7 @@ public: * LEFT_BUTTON, A_BUTTON, UP_BUTTON, etc. */ - uint8_t static getInput(); __attribute__ ((deprecated("use buttonsState() instead"))); + uint8_t static getInput(); __attribute__((deprecated)) __attribute__ ((warning("use buttonsState() instead"))); uint8_t static buttonsState(); // paints 8 pixels (vertically) from a single byte