The port configuration api was not correctly setting the port-pins'
direction. Changed the port driver to call the gpio driver for
configuration (read and write still are optimized for port-level
operations) so that the behavior is consistent.
This is related to https://github.com/ARMmbed/mbed-os/issues/11256
When TARGET_PSA is enabled on Cortex-A boards, the SECURE
is redeclared. So to minimize the impact we can redeclare this in
val.h which is used only by Mbed. And `security_t` itself is used in
mbed-os\components\TARGET_PSA\TESTS, but the SECURE string is not used.
Renamed to `caller_security_t` which aligns with
https://github.com/ARM-software/psa-arch-tests
All scripts pertaining to example projects tests should be in the same
directory. The test framework uses Python2 therefore this script also needs
to be Python2 compatible.
Update to follow the same `goto exit_point` pattern that is used
by the rest of the functions to avoid leaving the mutex locked
when errors are detected and require the function to abort.
- Use a switch statement rather than shifting and masking to compute
the AlternateBytes value.
- Rename rounded_size to alt_bytes to clarify its purpose.
Existing code may a dependency on the old behavior of "-1" to
mean "no instruction". Therefore, update the typedef, and the value
of QSPI_NO_INST, to avoid breaking those uses.
Encourage the usage of consistent types (there are currently
a mix of `int` and `unsigned int` used for qspi instructions)
QSPI commands are limited to 8 bits, to this is a typdef to char
- Fixed miscalculation in SPI frequency setup (divider value).
- Added possibility to set up SCK line as NC (usable when SPI peripheral
is used to handle non-SPI protocols.
- Fixed handlingh of 16-bit (and other >8 bit) transfers.
(cherry picked from commit 7d391f257b4ff6cdd7b43eeaa4894f8ce6d2cf8e)
The TC flag is used in function serial_is_tx_ongoing to check if there is
an ongoing serial transmission. So this Flag must not be cleared at the
end of the transmission, otherwise, serial_is_tx_ongoing will notify that
TX is ongoing.
The impact is that it may prevent deep sleep to be entered.
Also there is no need to clear this flag at the end of the transaction
because it will be cleared automatically by HW when a new transmission
starts.
It is possible to temporarily suspend USB and safely preserve its
configuration. This is needed to allow a device to enter deep
sleep as a USBDevice instance prevents deep sleep. USB operation can be
suspended with `deinit` and restored with `connect`.