[PATCH v3] cpukit/aarch64: Add ESR register decoding
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Mar 23 05:34:27 UTC 2021
On 22/03/2021 21:43, Alex White wrote:
>>> +static void _binary_sprintf(
>>> + char *s,
>>> + size_t maxlen,
>>> + uint32_t num_bits,
>>> + uint32_t value
>>> +)
>>> +{
>>> + string_context sctx = {
>>> + .s = s,
>>> + .n = maxlen
>>> + };
>>> + uint32_t mask = 1<<(num_bits-1);
>>> + int cx = 0;
>>> +
>>> + while ( mask != 0 ) {
>>> + cx += _IO_Printf(put_char, &sctx, "%d", (value & mask ? 1 : 0));
>>> + //cx += snprintf(s + cx, maxlen - cx, "%d", (value&mask ? 1 : 0));
>> Commented out.
> Will fix.
It would be nice if this cpukit file could follow the score coding style.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list