MicrobitFileSystem occasionally needs to "refresh" FLASH page that have been
marked as deleted, such that they can be used again. When this happens, an
unused FLASH page is used to temporarily hold wanted data (a scratch page).
This is alloctaed ina round robin fashion from all available data pages to
load balance wear across pages.
This patch ensures that a page used in this fashion is erased after use, such
that it is ready for use again as a data page.
This patch may also address https://github.com/Microsoft/pxt/issues/1495
- Analog Input now correctly reads values in the 8 bit range.
- Analog Output now reaches 100% duty cycle for 8 but input value of 255.
- Reintroduce notify() call into updateBLEInputs() method.
- Minor code cleanups
Some higher level languages initialise Strings and Images used RefCounted types. In certain scenarios, they could be initialised with NULL, there was no error checking for this case, and users observed error code 030 (a heap error). This was traced back to some error checking in RefCounted.cpp, where the reference is tested. In these initialisers the RefCounted type was NULL.
Added some additional error checking in ManagedString and ManagedImage.
Closes#283.
Name the quadrature QDEC_USE_xx rather than QDEC_USING_xx, because they
represent intent rather than status.
Also fixes bug where system tick wouldn't be registered at start() when
configured to do so.
- Fixed optimsation case for when brightness is set to zero in render() method.
- Introduce equivalent optimsation case for renderGreyscale(), to
promote consistent behaviour.
Nordic's Soft Device is not tolerant to applications making direct access to
the non-volatile memory controller (NVMC) hardware. This patch adds a code
path to replace native NVMC calls with equivalent Soft Device calls when Soft
Device is enabled.
This patch is necessary to resolve issues related to lock ups when using
either MicroBitStorage or MicroBitFileSystem when BLE is enabled.
Previously DynamicPWM had a per instance member variable that was not shared across all instances of DyanmicPWM which is not true to the hardware, that shares a period across all pwm channels.
This commit adds a static member variable, and sets the default to 20000 us - a default set at the mbed layer.
As per issue #218, pwm has always been unstable resulting in a clicking noise atwhen tones are amplified, and twitchy servo controllers.
This commit when combined with lancaster-university/mbed-classic#03f4fb and lancaster-university/mbed-classic#be51bd will produce a more stable waveform, whilst also maintaining the behaviour of DynamicPwm which has now been absorbed by the PWM driver itself.
As per issue #115, AnalogOut was not capable on all IO even though there was no reason for this to be the case.
This commit adds a revised PinCapability enumeration, adding AnalogOut capability to all capable pins using the PIN_CAPABILITY_STANDARD enum, which combines PIN_CAPABILITY_DIGITAL and PIN_CAPABILITY_ANALOG_OUT.