Potentially allow platforms with known-good seed generation to avoid the
code overhead of splitmix64. Not actually activating, as I don't believe
we have any such platforms yet...
This fix addresses issue #2638 for STM32F1.
The STM32F1 family has a diffeerent register set for pull-up and pull-down
settings.
The same principle to read HW state is applied, as in commit:
[STM32] Fix pull over write to all families
except registers are different.
Also in this patch we make code a bit more linear.
Depending on pin_index, different register and shift index must be used.
Instead of checking this in several place, let's make a check at the
beginning of the function and use local register and shift variables.
This applies the same fix as was done for F4 to solve issue #2638.
The fix applies ell to all other families excpet STM32F1.
Basically, to avoid over-writing the pull-up/-down settings, we read the
current state from HW.
* Delete transactions that are not supposed to get reply
When sending non-confirmable request that is not supposed to get reply,
it must be deleted after sending.
Also some general code-cleaning included.
* Remove outdated transactions from queue
If transaction does not get response, it will be deleted from queue.
Linux /dev/urandom implementation now folded into main file.
Main file can be forced to use own pseudo-RNG by defining RANDLIB_PRNG -
used for unit tests, and could maybe also be used on simulator.
Rather than using system rand(), provide our own pseudo-RNG.
Generator used is "xoroshiro128+", which has 16 bytes of state and
2^128-1 period.
Main advantage is that we can now seed with up to 128 bits of entropy,
rather than the 32 bits srand() limited us to. We also can be assured of
the quality of the algorithm.
As the core generator is 64-bit, we now provide a get 64-bit function,
and others are based on this.
Incorporate Linux's /dev/urandom use into the main source file.
In the config store create test in test case #5 the amount of available
memory is determined by fully allocating the heap. This is done
multiple times to determine if there is a memory leak. This causes
problems when even slight fragmentation occurs in the heap, since
the size that can be allocated is decreased slightly, which the test
flags as a memory leak.
This patch makes memory leak detection more robust by using metrics
provided by mbed_stats_heap_get. These metrics are an exact
measurement of memory allocated is not changed by fragmentation.
This allows the memory leak test to report correct values regardless of
fragmentation.
Changes:
Refactor examples.py to add a new command line option to provide an update
tag.
Refactor examples.py to add new functionality to update the version of
mbed-os in the examples to a supplied tag.
Refactor examples.py to make cloning the example repos, updating their
mbed-os version and compiling, into library functions and move to a new
library module.
Refactor the format of the examples.json file to make it compatible with
both examples.py and update.py.
Refactor update.py so that examples are test compiled prior to updating.
Refactor update.py so that only examples tagged as auto-updatable and that
fully compile are automatically updated.