Despite the [silk on the dock board](https://wiki.makerdiary.com/nrf52840-m2-devkit/resources/nrf52840_m2_devkit_hw_diagram_v1_0.pdf), the SDA/SCL pins weren't defined. Though, they were already defined in `mpconfigboard.h`.
Same for RX/TX. It looks like it declared `TXD` and `RXD`, so I didn't want to remove those, but I think it makes sense to have the "standard" pin names, but I moved ithem to illustrate they were all referencing the same pins.
I mimicked the whitespace I saw in the metro_nrf52840_express port.
These changes remove the caveat from supervisor.runtime.serial_connected.
It appears that _tud_cdc_connected() only tracks explicit changes to the
"DTR" bit, which leads to disconnects not being registered.
Instead:
* when line state is changed explicitly, track the dtr value in
_serial_connected
* when the USB bus is suspended, set _serial_connected to False
Testing performed (using sam e54 xplained): Run a program to show
the state of `serial_connected` on the LED:
```
import digitalio
import supervisor
import board
led = digitalio.DigitalInOut(board.LED)
while True:
led.switch_to_output(not supervisor.runtime.serial_connected)
```
Try all the following:
* open, close serial terminal program
- LED status tracks whether terminal is open
* turn on/off data lines using the switchable charge-only cable
- LED turns off when switch is in "charger" position
- LED turns back on when switch is in Data position and terminal is
opened (but doesn't turn back on just because switch position is
changed)
I recently misdiagnosed a "maybe-uninitialized" diagnostic as a bug in
asf4. However, the problem was in our SPI code.
A special case for samr21 MCUs was being applied to same54p20a and possibly
other D5x/E5x MCUs, since the check was simply for pin PC19 existing at all.
Change the check to use the macro PIN_PC19F_SERCOM4_PAD0 which is only
defined if special function F of pin PC19 is SERCOM4 PAD0.
Reorganize the code a little bit so that brace-matching in editors is
not confused by the conditionalized code, including an unrelated change
for APA102_SCK's condition.
Revert the change to the Makefile that incorrectly attempted to silence
the diagnostic.