- removed ROW1 and COL1 dependencies that are defined in the bbc-microbit
family of mbed targets, so that microbit-dal can be compiled for other mbed
targets. #172
- removed legacy reference to the default microbitMatrixMap in
MicroBitDisplay, in favour of the map configured through the constructor.
- Added timeout code to prevent over-generation of SHAKE events.
- Tuning of SHAKE detection parameters to align sensitivity with existing
microbit.co.uk algorithm
- Introduced an overload to MicroBitIOPin::getDigitalValue() to permit the
setting of a specific pull mode at the time of reading.
- Bugfix of MicroBitIOPin::setPull() to persist preferred pull settings
- Added configuration options to allow the default PullMode to be set via
compile time option through MicroBitConfig.h or YOTTA_CONFIG
There was an unnecessary cast in MicroBitSerial.read that meant error
codes would never be returned to the user application, this has now
been removed.
Added a blocking send to the UART service for the case when the bytes
to transmit is greater than the size of the transmission buffer.
The characteristics have now diverged from the BLE_API’s
implementation, and are now more semantic.
Send now returns an error code if there is no device connected, or
indications have not been enabled.
Debug statements have also been removed.
Previously if a user used wait[_us,_ms] in interrupt context,
the device would hang indefinitely due to a previous patch
in the mbed classic library.
This commit updates the reference to mbed-classic, which has
the appropriate fix.
By replacing the addition operator with a friend operator, order of
operations doesn’t matter, provided that at least one argument is a
ManagedString.
```C++
ManagedString a = "A"; // OK
ManagedString b = a + ", " + 2; // OK
ManagedString c = "a" + a + 2; // OK
ManagedString d = 1 + "," + 2; // FAILS
```
Increased granularity of system timer.
Added events for Rise, Fall, Pulse HI and Pulse LO.
Pulse HI/LO events give the time that the pin was HI or LO for using the timestamp field of the MicroBitEvent.
Added setPull() to configure the pull of the pin when in a digital input mode.
Issue #140 highlighted the fact there would be multiple writes of the
same data when storing calibration information.
This patch introduces a memcmp before initiating the storage of
KeyValuePairs in the “put” member function.
Issue #129 illustrated that panic is capable of accepting numbers in
the range 0-999 and should therefore not have an arbitrary range of
0-255.
Additionally, this commit introduces gaps between consecutive numbers
of the same value e.g. 999. As a result, the speed of panic has also
been reduced.
In SYNC_SLEEP and SYNC_SPINWAIT modes the maximum length that could be
sent was always dictated by the buffer size.
This was incorrect as these two modes should wait until all characters
have been transmitted from the given buffer before returning control to
the user.
ASYNC mode will still return immediately after copying the number of
bytes available in the TX buffer.
#90 illustrated out that even though 3 pins have the required pull ups
to perform resistive “touch” sensing, developers may want to attach
their own pull ups and use MicroBitPins as resistive inputs more
generally.
This patch removes PIN_CAPABILITY_TOUCH, as all pins with
PIN_CAPABILITY_DIGITAL can become a resistive input.
N.b. In order to utilise pins used by the display, the display MUST be
disabled.
Ammended basic gesture recogniser to correclty generate threshold events for
high G forces (3G, 6G and 8G threshold events).
Also refined semantics such that events for any given impulse will be
generated for ALL thresholds below that below. e.g a 7G impulse will now raise
both the 3G and 6G threshold events.
This new member function allows the configuration of the pull currently
applied to the MicroBitPin instance. This member function only has
affect when the MicroBitPin instance is in a digital input mode.