qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1 1/5] Netduino_USART: Add the Netduino Plus 2


From: Alistair Francis
Subject: Re: [Qemu-devel] [PATCH v1 1/5] Netduino_USART: Add the Netduino Plus 2 USART Controller
Date: Tue, 2 Sep 2014 12:04:34 +1000

On Tue, Sep 2, 2014 at 2:30 AM, Peter Maydell <address@hidden> wrote:
> On 24 August 2014 03:09, Peter Crosthwaite <address@hidden> wrote:
>> If you make your registers an array, you can index the with the offset
>> and remove the repeated s->foo return logic. You can also use a single
>> memset to do all the 0 resets.
>
> Hmm. I dislike that style personally, especially for devices
> like this which only have a handful of registers.

I think it'll end up being just as complex, as some of the offsets
cause multiple registers to change (status registers and things
like that)

I'll keep it as a switch case for now

Thanks,

Alistair

>
> -- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]