Browse Source

Added BT support on AT90USB devices

Added AT90USB device BT connectivity support using second UART.
fmalpartida 11 years ago
parent
commit
7b556d2e96
2 changed files with 4 additions and 17 deletions
  1. 4
    10
      Marlin/Configuration.h
  2. 0
    7
      Marlin/Marlin.h

+ 4
- 10
Marlin/Configuration.h View File

22
 // This allows the connection of wireless adapters (for instance) to non-default port pins.
22
 // This allows the connection of wireless adapters (for instance) to non-default port pins.
23
 // Serial port 0 is still used by the Arduino bootloader regardless of this setting.
23
 // Serial port 0 is still used by the Arduino bootloader regardless of this setting.
24
 #define SERIAL_PORT 0
24
 #define SERIAL_PORT 0
25
-//#define SERIAL_PORT 1  // Define serial port 1 for bluetooth configuration in AT90USB configurations
26
 
25
 
27
 // This determines the communication speed of the printer
26
 // This determines the communication speed of the printer
28
 // This determines the communication speed of the printer
27
 // This determines the communication speed of the printer
29
 #define BAUDRATE 250000
28
 #define BAUDRATE 250000
30
 
29
 
31
 // This enables the serial port associated to the Bluetooth interface
30
 // This enables the serial port associated to the Bluetooth interface
32
-//#define BTENABLED              // Enable BT interface
33
-
34
-
35
-// SERIAL_PORT selects which serial port should be used for communication with the host.
36
-// This allows the connection of wireless adapters (for instance) to non-default port pins.
37
-// Serial port 0 is still used by the Arduino bootloader regardless of this setting.
38
-#define SERIAL_PORT 0
31
+//#define BTENABLED              // Enable BT interface on AT90USB devices
39
 
32
 
40
 
33
 
41
 //// The following define selects which electronics board you have. Please choose the one that matches your setup
34
 //// The following define selects which electronics board you have. Please choose the one that matches your setup
76
 // 21 = Elefu Ra Board (v3)
69
 // 21 = Elefu Ra Board (v3)
77
 
70
 
78
 #ifndef MOTHERBOARD
71
 #ifndef MOTHERBOARD
79
-//[FMC]#define MOTHERBOARD 7
80
-#define MOTHERBOARD 83
72
+//#define MOTHERBOARD 7
81
 #endif
73
 #endif
82
 
74
 
83
 // Define this to set a custom name for your generic Mendel,
75
 // Define this to set a custom name for your generic Mendel,
522
 
514
 
523
 // Shift register panels
515
 // Shift register panels
524
 // ---------------------
516
 // ---------------------
517
+// 2 wire Non-latching LCD SR from:
518
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
525
 //#define SR_LCD
519
 //#define SR_LCD
526
 #ifdef SR_LCD
520
 #ifdef SR_LCD
527
    #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
521
    #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister

+ 0
- 7
Marlin/Marlin.h View File

51
 
51
 
52
 #ifdef AT90USB
52
 #ifdef AT90USB
53
    #ifdef BTENABLED
53
    #ifdef BTENABLED
54
-         extern HardwareSerial bt;
55
          #define MYSERIAL bt
54
          #define MYSERIAL bt
56
    #else
55
    #else
57
          #define MYSERIAL Serial
56
          #define MYSERIAL Serial
58
    #endif // BTENABLED
57
    #endif // BTENABLED
59
 #endif
58
 #endif
60
 
59
 
61
-#ifdef AT90USB
62
-  #define MYSERIAL Serial
63
-#else
64
-  #define MYSERIAL MSerial
65
-#endif
66
-
67
 #define SERIAL_PROTOCOL(x) (MYSERIAL.print(x))
60
 #define SERIAL_PROTOCOL(x) (MYSERIAL.print(x))
68
 #define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y))
61
 #define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y))
69
 #define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x)))
62
 #define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x)))

Loading…
Cancel
Save