Skip to content

Conversation

@dmadison
Copy link
Owner

@dmadison dmadison commented Feb 1, 2020

The Arduino AVR core updated to version 1.8.2 on December 2nd, 2019. This merges those core changes to bring the XInput AVR repo up to date.

Commit Changes: 1.6.23 to 1.8.2


Compared to updating the Teensy repo this was pretty easy, since it shares the same structure as the upstream:

git checkout -b upstream-updates git remote add upstream git://github.com/arduino/ArduinoCore-avr.git git pull upstream master 

Then I had to manually fix the merge conflicts. Most of the files are untouched by the XInput changes and updated without issue. A handful of files were removed when I made the original modifications (like the CI json in the "extras" folder) and needed their changes discarded. Lastly, a few of the files that were heavily modified by XInput such as boards.txt and CDC.cpp needed to be merged by hand. I ended up copying the original versions, then tracking the history commit-by-commit to merge in the new changes.

All-in-all, not too bad! And that brings this repo up to date.

awatterott and others added 30 commits November 13, 2017 12:49
Casting to void is a well known trick for prevening 'unused parameter' warnings.
The standard mandates that placement new should be have a noexcept specifier.
Removed #undefs in SoftwareSerial.h that were marked as Arduino 0012 workaround and that broke several macros, including abs. See arduino/ArduinoCore-avr#30
Based on code originally by Rob van der Veer <rob.c.veer@gmail.com>, this adds USBDevice.isSuspended(), so user sketches can run custom code in their `loop` methods after checking if the device is suspended or not. Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Use of the stk500v1 protocol for Arduino as ISP does not work with native USB boards on Windows. The arduino protocol does. However, the arduino protocol makes it more likely that boards with an external USB interface chip will require the auto-reset circuitry to be disabled to allow them to be used as Arduino as ISP. That adds extra complexity to a process already difficult for the average Arduino user. For this reason, a new programmer using the arduino protocol is added specifically for using native USB boards as Arduino as ISP and the previous Arduino as ISP configuration is retained for use with all other boards.
Add ATmega32U4-compatible Arduino as ISP programmer
These are currently implemented by the Wire library, on twi.c
Remove commented out code for I2C interrupts on WInterrupts.c
Putting the parameter names in these commonly used prototypes makes syntax help like VS Code's Intellisense work 99% more useful. Without them, it doesn't give you the names of the parameters and you have to remember the semantics yourself. :(
Avoids unused variable warning if USB is enabled but pluggable USB is not
Remove historic Arduino 0012 workaround in SoftwareSerial
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
Added __attribute__ ((fallthrough));
checking `length` in below while statement
Removes unnecessary if branch (because length is checked in while statement below the if-clause).
Fix unused variable warning for non-pluggable USB in SendDescriptor
… when using with ternary operator such as bitWrite(value, bit, some_computed_value == 5 ? 1: 0);'
Add parameter names to common prototypes
aentinger and others added 18 commits September 16, 2019 10:22
Add `bitToggle` macro to complement `bitSet` etc
[TWI] Add __attribute__ ((fallthrough)) to remove recent GCC warnings
Correct yunmini.bootloader.file on boards.txt
Do not claim AT-protocol in CDC interface descriptor
Cast pins to signed integers to avoid Wtype-limits compile warning
Minor optimization in shiftOut function
…… (#52) * Changed linking order, so precompiled libraries can use the Arduino code functions. * Added 'compiler.libraries.ldflags', reverted object order in previous commit
No fixed value for USB power current.
Revert "Changed linking order, so precompiled libraries can be used"
* Interrupt ordering for 32u2 and 16u2 MCU * Added missing chip variants
@dmadison dmadison merged commit 924299c into master Feb 1, 2020
@dmadison dmadison deleted the upstream-updates branch February 1, 2020 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment