-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix compile errors #410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Open
Fix compile errors #410
+6,000
−4,201
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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#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>
This reverts commit b084848.
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.
...programmer Add ATmega32U4-compatible Arduino as ISP programmer
Add USBDevice.isSuspended()
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
Add placement new operator
The word "statics" was recently added to codespell's "rare" commonly mispelled words directory. By default, this dictionary is used in addition to the more conservative "clear" dictionary, resulting in a spurious failure of the "Spell Check" CI workflow. Although this could be fixed by adding the word to the ignore list, it seems that an increasing number of common words being added to this dictionary, so I think it's best to just remove it altogether. The goal for the "Spell Check" workflow is to catch some typos without a significant number of false positives, even if that means some misspellings slip through. I think the "clear" dictionary is more in line with that goal.
Don't use codespell's "rare" dictionary for CI spell check
Allow disabling CDC with -DCDC_DISABLED
...all to __divmodhi4
Speed up 'available' method by inserting unsigned int cast
...y-support Add support for pluggable discovery
...rk-upload Fix legacy `upload.network_pattern` rule
...ild/windows/dist/drivers (moved also gemma stuff under `gemma/`)
Add drivers originally bundled with Java IDE directly in the core
The "Compile Examples" GitHub Actions workflow provides a basic "smoke test" for the platform by compiling the relevant example sketches for each of the boards on every commit and pull request. A new board has been added to the platform (Uno Mini) and so should be added to the list of boards compiled for in this workflow. Even though the Uno compilation does provide reasonable coverage for the Uno Mini due to their similar configurations, that coverage does not extend to the board definition itself.
Add unomini to sketch compilation CI workflow
Arduino has added a new board to the AVR-based line: the Uno Mini. The Uno Mini has its own board definition in this platform, which produces a dedicated item in the **Tools > Board** menu of the Arduino IDE. The classic Arduino IDE arranges the Boards menu for each platform according to the order of occurrence of the board definition in the platform's boards.txt configuration file. The previous placement of the Uno Mini board definition resulted in the board appearing at the end of the menu, along with retired and 3rd party boards. The new placement will cause it to be shown alongside the related Arduino Uno and in a position befitting the latest official AVR board.
Use more logical Boards menu placement for Uno Mini
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
.../actions/checkout-3 Bump actions/checkout from 2 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v2...v3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
.../actions/upload-artifact-3 Bump actions/upload-artifact from 2 to 3
Use established KEYWORD_TOKENTYPE for Wire keyword
@leg0
leg0
force-pushed
the
api-fix-compile-errors
branch
from
April 21, 2022 10:29
712cf1d
to
6bddc5f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix compile errors in Wire and UART.