1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00
Commit Graph

1439 Commits

Author SHA1 Message Date
d3359d3670 Don't use timer for zero delay 2014-12-01 00:37:51 +03:00
9cc12ccc15 Add ESP8266WiFi library 2014-12-01 00:36:56 +03:00
4fc356fbf5 Add circular buffer implementation 2014-12-01 00:36:07 +03:00
c346734adc Move some code to flash and fix prototypes 2014-12-01 00:34:59 +03:00
22b88f73c2 Fix malloc/free references 2014-12-01 00:34:28 +03:00
636745b9a8 Fix initialisation, fix HardwareSerial, add esptool.py flashing 2014-11-25 09:58:14 +03:00
c633f53634 Implement digital IO functions 2014-11-21 21:23:27 +03:00
71e7ed040f Tidy up backend code for esp8266 (malloc, free, yield) 2014-11-21 19:15:40 +03:00
e059e5a231 Implement global init for esp8266 2014-11-21 18:14:45 +03:00
723c87c1b7 Implement delay() 2014-11-21 12:16:12 +03:00
11e8e3d16f Fix build errors 2014-11-21 12:15:50 +03:00
b42b22c9e7 Fix continuations 2014-11-21 12:15:03 +03:00
319c22d492 Continuations support 2014-11-20 17:25:27 +03:00
307a029a0e Updates for esp8266 platform 2014-11-20 17:25:01 +03:00
e94179fbd3 Wiring time functions 2014-11-16 16:09:55 +03:00
b8d51b9409 Generate binary from irom0.text for flashing at 0x40000 2014-11-15 12:30:07 +03:00
a12c6fcea2 Basic support for esp8266 platform
This includes empty stubs for most core Arduino functions.
Need to actually implement all those digital reads writes whatever.
Need to prebuild toolchains (xtensa-elf-lx106) for 3 platforms and put them on some download server.
Need to do the same with esptool.
Need to fix 0x40000 binary generation and add correct upload commands.
Maybe even implement uploads over WiFi.
2014-11-15 10:45:08 +03:00
34c40b224f [avr] SPI: removed redundant include 2014-11-14 00:23:11 +01:00
993cc9bbb4 [avr] Small comments and headers fixes in SPI 2014-11-14 00:23:11 +01:00
cd9a9e3fd7 Reduce avrdude verbosity
Previously, when verbose uploads were enabled, avrdude was run with four
-v options, causing it to dump all raw bytes exchanged with the
bootloader. This floods the console so much that meaningful output
mostly disappears.

Most users probably want to enable verbose mode just to see what avrdude
command is ran. Furthermore, users that benefit from the raw bytes
dumped are perfectly capable of either running avrdude manually, or
modifying platform.txt. Given that, running avrdude with just one  -v
should be plenty.

This fixes #891.
2014-10-30 12:36:06 +01:00
d1714a9fb8 [sam] Added -MMD flag to tell compiler to produce dependencies files
Now a full rebuild of the sketch is triggered only if needed.
2014-10-22 13:36:14 +02:00
0824abfee5 Merge branch 'master' into ide-1.5.x
Conflicts:
	hardware/arduino/cores/arduino/HardwareSerial.cpp
	hardware/arduino/cores/robot/Arduino.h
2014-10-21 17:47:59 +02:00
62cf4b6b55 Revert "Match return value to type in available()"
This reverts commit f40e471354.
Added an hint for the buffer sizes.

See #2057
Fixes #2367
2014-10-21 17:18:26 +02:00
58b6fd4789 Fixed missing NOT_AN_INTERRUPT constant in digitalPinToInterrupt()
Fixes #2379
2014-10-21 16:55:37 +02:00
3687289727 Merge pull request #2330 from spiritinlife/ide-1.5.x
Add #include "Print.h" in Server.h    Ide 1.5.x
2014-10-01 13:29:29 +02:00
21939e6f89 [sam] Fixed compile error when using math functions
Fixes #2338
2014-09-30 17:34:25 +02:00
2c289ace73 Add #include "Print.h" in Server.h 2014-09-26 22:59:02 +03:00
f5fe16bf2a Add #include "Print.h" in Server.h 2014-09-26 22:58:19 +03:00
974613a0a2 [sam] Fixed architecture specific macro digitalPinToTimer, added comment to uninplemented portModeRegister
Fix #1833
2014-09-22 00:38:02 +02:00
4dd931a99a set correct max size for mega2560 (to address issue #2277)
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
2014-09-21 17:10:06 +05:30
15064ad96a set correct max size for mega2560
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
2014-09-20 03:09:54 +05:30
84518e442c Fixed attribution rights for SAM delayMicroseconds function 2014-09-16 12:31:16 +02:00
44bcd2040b Merge branch 'master' into ide-1.5.x
Conflicts:
	app/src/processing/app/Base.java
	build/build.xml
	todo.txt
2014-09-16 12:19:39 +02:00
5f67650b80 Fixed trivial include error introduced in previous commit 2e3e539b... oops... 2014-09-12 16:58:05 +02:00
8018a26e3d Merge pull request #2299 from cmaglie/ide-1.5.x-spi-updates
Missing SPI Transaction API methods on Due (SAM3X)
2014-09-12 14:07:03 +02:00
2e3e539b71 Added license to USBAPI.h
Close #1847
2014-09-12 12:27:39 +02:00
69e37647a6 Ported #1397 to SAM. 2014-09-12 12:06:00 +02:00
3d222cc372 Merge pull request #1937 from matthijskooijman/stringindex
String index fixes and cleanups
2014-09-12 11:56:12 +02:00
6a5b82f062 [sam] Implementation of SPI multibyte transfer 2014-09-11 17:50:00 +02:00
5f88564b2b [sam] Simplified formula for SPI speed 2014-09-11 13:57:08 +02:00
848dd39313 [sam] SPI library: added SPI_HAS_EXTENDED_CS_PIN_HANDLING flag
This allows to check if SPI provides extended API to allow automatic
CS pin handling.
2014-09-11 13:57:07 +02:00
11cf45d6d6 Fix indent and small cosmetic changes 2014-09-10 18:22:02 +02:00
04dba1e46f Fix off-by-one in String::substring
When checking the `left` argument, it previously allowed having
left == len. However, this means the substring starts one past the last
character in the string and should return the empty string. In practice,
this already worked correctly, because buffer[len] contains the trailing
nul, so it would (re)assign the empty string to `out`.

However, fixing this check makes it a bit more logical, and prevents a
fairly unlikely out-of-buffer write (to address 0x0) when calling
substring on an invalidated String:

	String bar = (char*)NULL;
	bar.substring(0, 0);
2014-09-10 13:42:06 +02:00
6f9674288b Merge pull request #2279 from cmaglie/fix-leo-upload-osx10.9.4
Fix for upload problems on Arduino Leonardo (and derivatives) on OSX 10.9
2014-09-10 12:58:10 +02:00
86015f441e Simplify String::remove(unsigned int)
Previously, this method calculated the length of the string from the
given index onwards. However, the other remove() method called already
contains code for this calculation, which is used when the count passed
in is too big. This means we can just pass in a very big count that is
guaranteed to point past the end of the string, shrinking the remove
method by a few bytes.
2014-09-10 12:33:25 +02:00
2068f88a21 Fix bounds check in String::remove()
Previously, if you passed in a very big index and/or count, the
`index + count` could overflow, making the count be used as-is instead
of being truncated (causing the string to be updated wrongly and
potentially writing to arbitrary memory locations).

We can rewrite the comparison to use `len - index` instead. Since we
know that index < len, we are sure this subtraction does not overflow,
regardless of what values of index and count we pass in.

As an added bonus, the `len - index` value already needed be calculated
inside the if, so this saves a few instructions in the generated code.

To illustrate this problem, consider this code:

String foo = "foo";
Serial.println(foo.length()); // Prints 3
foo.remove(1, 65535); // Should remove all but first character
Serial.println(foo.length()); // Prints 4 without this patch

Not shown in this is example is that some arbitrary memory is written
as well.
2014-09-10 12:33:25 +02:00
2b90124e3d Remove unneeded check in String::remove(unsigned int)
This check already happens in the remove(unsigned int, unsigned int)
method that is caled, so there is no need to also check this here.
2014-09-10 12:33:24 +02:00
9a8b9c5c58 Fixed license for new.cpp and small cosmetic changes 2014-09-06 12:44:53 +02:00
37ee800abd Correct implementation of gcc specific internal functions
The following empty stubs has been replaced by the gcc
flag -fno-threadsafe-static:

  int __cxa_guard_acquire(__guard *);
  void __cxa_guard_release (__guard *);
  void __cxa_guard_abort (__guard *);

The following empty stubs has been moved into their specific
module abi.cpp:

  void __cxa_pure_virtual(void) __attribute ((noreturn));
  void __cxa_deleted_virtual(void) __attribute ((noreturn));

Fix #107
2014-09-06 12:42:25 +02:00
b0b83625c1 Printable.h doesn't need new.h but only stdlib.h for size_t.
Probalby new.h may be removed completely.
2014-09-06 12:37:57 +02:00