Skip to content

Conversation

leg0
Copy link

@leg0 leg0 commented May 17, 2021

Fix compile errors in Wire and UART.

  • added namespace qualifications where necessary
  • fixed conflicting return types in overrides
  • removed requestFrom overloads that don't add value and make the function more difficult to use.

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#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.
…programmer

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
per1234 and others added 17 commits June 30, 2021 06:31
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
Speed up 'available' method by inserting unsigned int cast
…y-support

Add support for pluggable discovery
…rk-upload

Fix legacy `upload.network_pattern` rule
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.
@per1234 per1234 added the bug label Jan 1, 2022
per1234 and others added 11 commits January 3, 2022 00:48
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 712cf1d to 6bddc5f Compare April 21, 2022 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.