* Changed to use compiler intrinsics
* Significantly reduced comments near memory barrier usage, as per request
* Updating `attachInterrupt()` loops to more closely match requested style
* First loop should not be checking pinmap for -1.
* Second loop should ensure no pending event when
first allocating the GPIOTE channel.
* Second loop needs to update pinmap with pin when
allocated the GPIOTE channel.
Reduce the number of cycles spent in the GPIOTE ISR,
by reading common volatile registers across AHB only
once, and using a safer hack to prevent spurious ISR
firing when the last channel's event was cleared.
First, when looking for a channel, first loop through
all mapped channels to see if the GPIO was already mapped.
This prevents a single GPIO being configured for more than
one channel at a time.
Second, do not use a GPIOTE channel if the channel is
already in use (e.g., by a library, sketch, or other code
outside the Board Support Package).
- When PIN_PWD is HIGH, Xenon is being powered through the USB
- When PIN_CHG is LOW, a battery attached to Xenon is being charged
Note though that prior to using these pins it is neccessary to specify pinMode(PIN_CHG, INPUT) and pinMode(PIN_PWR, INPUT) due to how they're being implemented in hardware. Using these two pins 3 states of power can be deduced:
- hasUsbPower = digitalRead(PIN_PWR);
- isCharging = (hasUsbPower && !digitalRead(PIN_CHG));
- onBatteryPower = !hasUsbPower;
Added the missing LED1 initialisation.
BUTTON_FRESET pin number assignment was fixed.
See commit https://github.com/adafruit/Adafruit_nRF52_Arduino/commit/583ad02a
increase sd attribute table size from 0x800 to 0xC00,
increase linker memory for SD 840 from 3400 to 6000
Since the linker is updated, all nRF52840 boards using
that linker file should also be updated.
The two defines that can later be generated in a user's
own boards.local.txt (or platforms.local.txt) are:
build.logger_flags
build.sysview_flags
To be used for the following `#define` identifiers:
-DCFG_LOGGER=0
-DCFG_SYSVIEW=0
NOTE: These are NOT defined by default. This is preparation
for enabling alternative debug output locations.