The DEVICE_FOO macros are always defined (either 0 or 1).
This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
SerialWireOutput was outputting 1 character per 32-bit write to the
ITM stimulus port. This is inefficient, and causes processing problems
with some viewers due to them receiving 3 NUL bytes between each
desired character.
Rework to allow us to be more efficient, and eliminate those NUL bytes:
* Retain existing mbed_itm_send() and clarify it's a single 32-bit write.
* Add new mbed_itm_send_block() that is appropriate for sending
character data, and modify SerialWireOutput to use it.
* Move "wait for FIFO ready" check to before the write, rather than
after.
One minor correction - FIFOREADY is a single bit of the register read.
Don't interpret reserved bits.