simulavr-devel
[Top][All Lists]
Advanced

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

Re: [Simulavr-devel] HWPort pointers


From: Petr Hluzín
Subject: Re: [Simulavr-devel] HWPort pointers
Date: Sun, 17 Nov 2013 22:49:08 +0100

>
> I'd say make them all static instances.
> 'Twould eliminate some unneeded indirection.
> I'm pretty sure they can all be initialized in the pre-body
> portions of the constructors of the classes that use them.
>

I think you mean to make them member variables. Like this:
   HWPort            portb;
instead of this in class AvrDevice_atmega8:
   HWPort *          portb;

Remember that simulavr can be used to simulate multiple chips at the
same time, so the HWPort objects cannot be static variables. User
needs to use Python or TCL (or Prolog?) API to create more than one
chip, this feature is not available from command line.

-- 
Petr Hluzin



reply via email to

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