From ca6b29d80b040a128f3acbaedc2288fbf518f2b9 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Fri, 31 Jan 2014 17:43:29 +0100 Subject: [PATCH] SQUASH: Revert "Remove AVROPENDOUS support" This reverts commit 69789061dc597d0920c4974b8ed634980b1244ad. See https://github.com/billroy/bitlash/issues/20#issuecomment-33818618 --- src/bitlash.h | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/src/bitlash.h b/src/bitlash.h index 61163b2..7be499d 100644 --- a/src/bitlash.h +++ b/src/bitlash.h @@ -188,6 +188,58 @@ #define USER_FUNCTIONS #endif +/////////////////////////////////////////////////////// +// +// AVROPENDOUS and TEENSY BUILD OPTIONS +// +#if defined(__AVR_AT90USB162__) + +//#define AVROPENDOUS_BUILD +#if defined(AVROPENDOUS_BUILD) +#define MINIMUM_FREE_RAM 20 +#define NUMPINS 24 +#undef HARDWARE_SERIAL_TX +#undef SOFTWARE_SERIAL_TX +void beginSerial(unsigned long baud) { ; } +#define serialAvailable usbAvailable +#define serialRead usbRead +#define serialWrite usbWrite +#include +#endif // defined AVRO + +#define TEENSY +#ifdef TEENSY +#endif // defined TEENSY + +#endif // defined '162 + + +/////////////////////////////////////////////////////// +// +// ATMega32U4 BUILD OPTIONS +// +#if defined(__AVR_ATmega32U4__) + +//#define AVROPENDOUS_BUILD +#if defined(AVROPENDOUS_BUILD) +#define MINIMUM_FREE_RAM 50 +#define NUMPINS 40 +#undef HARDWARE_SERIAL_TX +#undef SOFTWARE_SERIAL_TX +void beginSerial(unsigned long baud) { ; } +#define serialAvailable usbAvailable +#define serialRead usbRead +#define serialWrite usbWrite +#include +#endif // AVRO + +#define TEENSY2 +#if defined(TEENSY2) +#endif // TEENSY2 + +#endif // defined '32U4 + + /////////////////////////////////////////////////////// // // SD CARD SUPPORT: Enable the SDFILE define for SD card script-in-file support @@ -262,6 +314,18 @@ typedef int numvar; typedef unsigned int unumvar; #endif // arduino_build + +#ifdef AVROPENDOUS_BUILD +// USB integration +uint8_t usbAvailable(void); +int usbRead(void); +void usbWrite(uint8_t); +void usbMouseOn(void); +void usbMouseOff(void); +void connectBitlash(void); +#endif // avropendous + + // Function prototypes