Added BT support on AT90USB devices

Added AT90USB device BT connectivity support using second UART.
This commit is contained in:
fmalpartida 2013-11-03 19:57:06 +01:00
parent 5b3f60ea2e
commit 7b556d2e96
2 changed files with 4 additions and 17 deletions

View file

@ -22,20 +22,13 @@
// This allows the connection of wireless adapters (for instance) to non-default port pins. // This allows the connection of wireless adapters (for instance) to non-default port pins.
// Serial port 0 is still used by the Arduino bootloader regardless of this setting. // Serial port 0 is still used by the Arduino bootloader regardless of this setting.
#define SERIAL_PORT 0 #define SERIAL_PORT 0
//#define SERIAL_PORT 1 // Define serial port 1 for bluetooth configuration in AT90USB configurations
// This determines the communication speed of the printer // This determines the communication speed of the printer
// This determines the communication speed of the printer // This determines the communication speed of the printer
#define BAUDRATE 250000 #define BAUDRATE 250000
// This enables the serial port associated to the Bluetooth interface // This enables the serial port associated to the Bluetooth interface
//#define BTENABLED // Enable BT interface //#define BTENABLED // Enable BT interface on AT90USB devices
// SERIAL_PORT selects which serial port should be used for communication with the host.
// This allows the connection of wireless adapters (for instance) to non-default port pins.
// Serial port 0 is still used by the Arduino bootloader regardless of this setting.
#define SERIAL_PORT 0
//// The following define selects which electronics board you have. Please choose the one that matches your setup //// The following define selects which electronics board you have. Please choose the one that matches your setup
@ -76,8 +69,7 @@
// 21 = Elefu Ra Board (v3) // 21 = Elefu Ra Board (v3)
#ifndef MOTHERBOARD #ifndef MOTHERBOARD
//[FMC]#define MOTHERBOARD 7 //#define MOTHERBOARD 7
#define MOTHERBOARD 83
#endif #endif
// Define this to set a custom name for your generic Mendel, // Define this to set a custom name for your generic Mendel,
@ -522,6 +514,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// Shift register panels // Shift register panels
// --------------------- // ---------------------
// 2 wire Non-latching LCD SR from:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
//#define SR_LCD //#define SR_LCD
#ifdef SR_LCD #ifdef SR_LCD
#define SR_LCD_2W_NL // Non latching 2 wire shiftregister #define SR_LCD_2W_NL // Non latching 2 wire shiftregister

View file

@ -51,19 +51,12 @@
#ifdef AT90USB #ifdef AT90USB
#ifdef BTENABLED #ifdef BTENABLED
extern HardwareSerial bt;
#define MYSERIAL bt #define MYSERIAL bt
#else #else
#define MYSERIAL Serial #define MYSERIAL Serial
#endif // BTENABLED #endif // BTENABLED
#endif #endif
#ifdef AT90USB
#define MYSERIAL Serial
#else
#define MYSERIAL MSerial
#endif
#define SERIAL_PROTOCOL(x) (MYSERIAL.print(x)) #define SERIAL_PROTOCOL(x) (MYSERIAL.print(x))
#define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y)) #define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y))
#define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x))) #define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x)))