avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] chip_erase and cycle_count cleanup


From: Jan-Hinnerk Reichert
Subject: Re: [avrdude-dev] chip_erase and cycle_count cleanup
Date: Tue, 2 Dec 2003 01:28:25 +0100
User-agent: KMail/1.5.1

On Tuesday 02 December 2003 01:25, Theodore A. Roth wrote:
> On Tue, 2 Dec 2003, Jan-Hinnerk Reichert wrote:
> > On Monday 01 December 2003 23:27, Theodore A. Roth wrote:

> > However, there is only one occurance of this magic number left in
> > my version and this is in avr_get_cycle_count():
> >
> >   if (cycle_count == 0xffffffff) {
> >     cycle_count = 0;
> >   }
>
> Even if it's only used once, it still improves readability by
> avoiding the magic number. 0xfffffffff doesn't infer the eeprom is
> erased without a few extra brain cycles.

No objections. Only open question is where to put the define. I would 
place it in "avr.c", since it is unuseable elsewhere. I would rather 
put it near the place where it is used, instead of the top of file. 

Is it considered bad style to do this?

> > BTW: Would you mind testing the patch on STK500 or PPI?
>
> Sure, but it may take a few days since I'm swamped with day job
> and simulavr work right now.

Take your time.

BTW: The listserver is either terribly slow or it is eating mails :-(

/Jan-Hinnerk





reply via email to

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