Age | Commit message (Collapse) | Author |
|
This fixes part of #287.
|
|
These are special functions that are presumably put into vtables for
deleted or pure virtual functions. Previously, this would call `abort()`
directly, but calling `std::terminate()` achieves the same effect, but
allows user code to change the behavior (e.g. to print to serial, blink
leds or whatever makes sense).
|
|
This allows calling it from other places later. The default
implementation calls `abort()`, but making it weak allows user code to
override this function (either directly, or by including a library like
uclibc++ that implements `std::set_terminate()`).
Note that this does not add a declaration for this function, since the
standard dictates this to be in `<exception>`, but we cannot
meaningfully or completely implement that header, so better leave it to
be overridden by e.g. libraries like uclibc++.
|
|
This makes these functions weak, so that a sketch or library can replace
them. This does not apply to all of these operators, only for the ones
that the C++ standard specifies as replaceable.
|
|
This makes this header complete up to including C++14, except two
exception classes that cannot be defined without `<exception>`.
The functions related to the "new_handler" are declared but not actually
defined, to prevent overhead and complexity. They are still declared to
allow implementing them in user code if needed.
This makes the implementation of all operator new and delete functions
comply with the C++11/C++14 specification in terms of which should be
actually implemented and which should be delegate to other functions.
There are still some areas where these implementations are not entirely
standards-compliant, which will be fixed in subsequent commits.
This fixes part of #287 and fixes #47.
|
|
Originally, the Arduino core used "new.h", rather than the standard
"new", probably because the implementation was incomplete, and for the
most commonly used new and delete operators, no include is needed at all
(they are defined implicitly by the compiler). However, now Arduino
does expose the "new" name, as an alias for the older "new.h". Given
that the standard name is "new", it makes more sense to put the actual
content in "new", and make "new.h" a compatibility header that includes
"new" instead of the other way around.
|
|
|
|
|
|
|
|
|
|
move timout handling into its own function
change timeout from milliseconds to microseconds
don't forget operating slave address or the bitrate when we reset because of a timeout
Co-Authored-By: Witold Markowski <witold.a.markowski@gmail.com>
fix delay datatype uint16_t --> uint32_t
Update libraries/Wire/src/utility/twi.c
fix mix up using TWBR instea of TWAR!
Co-Authored-By: Matthijs Kooijman <matthijs@stdin.nl>
Update libraries/Wire/src/utility/twi.c
fix 2nd TWBR/TWAR mixup
Co-Authored-By: Matthijs Kooijman <matthijs@stdin.nl>
twi_stop() should use the same timeout as everywhere else
all while loops are now protected by timeouts
Revert "twi_stop() should use the same timeout as everywhere else"
This reverts commit 68fe5f1dae1bb41183bb37eeda3fb453394a580c.
make timeout counter volatile
rename timeout function for improved clarity
- resetting the twi interface on timeouts is now optional
- timeouts in the ISR are no longer hardcoded and now obey the set timeout value
- a user-readable flag is now set whenever a timeout occurs
- the user can clear this flag whenever they like
|
|
Add "new" proxy header for compatibility with c++-standard #include<new>
|
|
Added precompiled library support
|
|
|
|
Correct comment on wiring_analog.c
|
|
|
|
|
|
Fix sine -> since typo in HardwareSerial files
|
|
|
|
|
|
* Interrupt ordering for 32u2 and 16u2 MCU
* Added missing chip variants
|
|
Port of https://github.com/arduino/Arduino/pull/7023
|
|
Remove Genuino Occurrences
|
|
|
|
|
|
Revert "Changed linking order, so precompiled libraries can be used"
|
|
c… (#52)"
This reverts commit 41f15a1359943ccb3ec9666a2e28a2d15e9581fc.
|
|
No fixed value for USB power current.
|
|
|
|
* Changed linking order, so precompiled libraries can use the Arduino code functions.
* Added 'compiler.libraries.ldflags', reverted object order in previous commit
|
|
Minor optimization in shiftOut function
|
|
Cast pins to signed integers to avoid Wtype-limits compile warning
|
|
Do not claim AT-protocol in CDC interface descriptor
|
|
Correct yunmini.bootloader.file on boards.txt
|
|
[TWI] Add __attribute__ ((fallthrough)) to remove recent GCC warnings
|
|
Add `bitToggle` macro to complement `bitSet` etc
|
|
|
|
Add placement new operator
|
|
Add parameter names to common prototypes
|
|
using with ternary operator such as bitWrite(value, bit, some_computed_value == 5 ? 1: 0);'
|
|
Fix unused variable warning for non-pluggable USB in SendDescriptor
|
|
Removes unnecessary if branch (because length is checked in while statement below the if-clause).
|
|
checking `length` in below while statement
|
|
Added __attribute__ ((fallthrough));
|
|
|
|
|
|
|
|
The CDC code presents itself as a virtual serial port. However, it also
sets the "bFunctionProtocol" value to 1, which means it supports
AT-commands, which is not actually the case. This might cause problems
with some software, such as ModemManager.
Originally, ModemManager would be very liberal with probing serial
devices, using a blacklist to prevent probing non-modems such as
Arduinos.
Since version 1.7.990, it has supported a "strict" mode where it tries to be
more restrained in what devices it probes. For CDC ACM devices, this
means it will only probe devices that claim to support AT-commands.
However, it also stopped applying the blacklist (intending to eventually
remove the blacklist), meaning it would again probe Arduinos.
This new strict policy is not the upstream default, but is enabled in
Debian (since Buster) and Ubuntu (since bionic 18.04.2).
The proper way to fix this, is to not claim AT comand support in the USB
device descriptor, which is what this commit does. The Arduino will
still show up as a virtual serial port, just not be probed by
ModemManager in strict mode.
For the commit that introduced the strict mode in ModemManager, see
https://cgit.freedesktop.org/ModemManager/ModemManager/commit/src?id=ee570d44dc117dc69f23e83313dd877f76c5e3e0
|
|
Remove historic Arduino 0012 workaround in SoftwareSerial
|
|
|