1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-20 14:54:31 +01:00

merging ide-1.5.x

This commit is contained in:
Federico Fissore 2013-02-13 16:25:40 +01:00
commit 7aeb972e14
15 changed files with 51 additions and 38 deletions

Binary file not shown.

View File

@ -52,9 +52,9 @@ import static processing.app.I18n._;
* files and images, etc) that comes from that.
*/
public class Base {
public static final int REVISION = 152;
public static final int REVISION = 153;
/** This might be replaced by main() if there's a lib/version.txt file. */
static String VERSION_NAME = "0152";
static String VERSION_NAME = "0153";
/** Set true if this a proper release rather than a numbered revision. */
static public boolean RELEASE = false;

View File

@ -302,6 +302,15 @@ public class Preferences {
// other things that have to be set explicitly for the defaults
setColor("run.window.bgcolor", SystemColor.control);
fixPreferences();
}
private static void fixPreferences() {
String baud = get("serial.debug_rate");
if ("14400".equals(baud) || "28800".equals(baud) || "38400".equals(baud)) {
set("serial.debug_rate", "9600");
}
}

View File

@ -159,6 +159,8 @@ public class Serial implements SerialPortEventListener {
if (portId.getName().equals(iname)) {
//System.out.println("looking for "+iname);
port = (SerialPort)portId.open("serial madness", 2000);
port.setDTR(true);
port.setRTS(true);
input = port.getInputStream();
output = port.getOutputStream();
port.setSerialPortParams(rate, databits, stopbits, parity);

View File

@ -121,8 +121,8 @@ public class SerialMonitor extends JFrame implements MessageConsumer {
lineEndings.setMaximumSize(lineEndings.getMinimumSize());
String[] serialRateStrings = {
"300","1200","2400","4800","9600","14400",
"19200","28800","38400","57600","115200"
"300","1200","2400","4800","9600",
"19200","57600","115200"
};
serialRates = new JComboBox();

View File

@ -99,7 +99,7 @@ public class PdeKeywords extends CTokenMarker {
//String htmlFilename = second.substring(tab + 1).trim();
String coloring = pieces[1].trim();
if (coloring.length() > 0) {
if (coloring.length() > 0 && Character.isDigit(coloring.charAt(coloring.length() - 1))) {
// text will be KEYWORD or LITERAL
boolean isKey = (coloring.charAt(0) == 'K');
// KEYWORD1 -> 0, KEYWORD2 -> 1, etc

BIN
build/linux/dist/lib/librxtxSerial.so vendored Executable file → Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,12 @@
ARDUINO 1.5.3 BETA
[ide]
* Removed useless baud rates from serial monitor
[arduino core]
* sam: Fixed delayMicrosecond() when interrupts are disabled
ARDUINO 1.5.2 BETA - 2013.02.06
[ide]

Binary file not shown.

View File

@ -233,7 +233,7 @@ esplora.bootloader.lock_bits=0x2F
esplora.build.mcu=atmega32u4
esplora.build.f_cpu=16000000L
esplora.build.vid=0x2341
esplora.build.pid=0x8036
esplora.build.pid=0x803c
esplora.build.board=ARDUINO_ESPLORA
esplora.build.core=arduino
esplora.build.variant=leonardo

View File

@ -41,12 +41,6 @@ extern "C"{
void yield(void);
#include "wiring.h"
#include "wiring_digital.h"
#include "wiring_analog.h"
#include "wiring_shift.h"
#include "WInterrupts.h"
/* sketch */
extern void setup( void ) ;
extern void loop( void ) ;
@ -195,6 +189,12 @@ extern const PinDescription g_APinDescription[] ;
// Include board variant
#include "variant.h"
#include "wiring.h"
#include "wiring_digital.h"
#include "wiring_analog.h"
#include "wiring_shift.h"
#include "WInterrupts.h"
// USB Device
#define USB_VID 0x2341 // arduino LLC vid
#define USB_PID_LEONARDO 0x0034

View File

@ -49,13 +49,6 @@ void delay( uint32_t ms )
yield();
}
void delayMicroseconds( uint32_t us )
{
uint32_t start = micros();
while ((micros() - start) < us)
;
}
#if defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
extern signed int putchar( signed int c ) ;
/**

View File

@ -62,8 +62,16 @@ extern void delay( uint32_t dwMs ) ;
*
* \param dwUs the number of microseconds to pause (uint32_t)
*/
extern void delayMicroseconds( uint32_t dwUs ) ;
static inline void delayMicroseconds(uint32_t) __attribute__((always_inline, unused));
static inline void delayMicroseconds(uint32_t usec){
uint32_t n = usec * (VARIANT_MCK / 3000000);
asm volatile(
"L_%=_delayMicroseconds:" "\n\t"
"subs %0, #1" "\n\t"
"bge L_%=_delayMicroseconds" "\n"
: "+r" (n) :
);
}
#ifdef __cplusplus
}

View File

@ -19,6 +19,16 @@
#ifndef _VARIANT_ARDUINO_DUE_X_
#define _VARIANT_ARDUINO_DUE_X_
/*----------------------------------------------------------------------------
* Definitions
*----------------------------------------------------------------------------*/
/** Frequency of the board main oscillator */
#define VARIANT_MAINOSC 12000000
/** Master clock frequency */
#define VARIANT_MCK 84000000
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/
@ -40,23 +50,6 @@ extern "C"{
# include <syscalls.h> /** RedHat Newlib minimal stub */
#endif
/*----------------------------------------------------------------------------
* Definitions
*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
#define ArduinoDueX_DevEd
/** Name of the board */
#define VARIANT_NAME "Arduino_DueX_Dev_Ed"
/** Frequency of the board main oscillator */
#define VARIANT_MAINOSC 12000000
/** Master clock frequency */
#define VARIANT_MCK 84000000
/*----------------------------------------------------------------------------
* Pins
*----------------------------------------------------------------------------*/