[Top][All Lists]

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

Re: [avr-libc-dev] eeprom_read_byte and clr ret_hi

From: Dmitry K.
Subject: Re: [avr-libc-dev] eeprom_read_byte and clr ret_hi
Date: Mon, 23 Nov 2009 08:45:31 +1000
User-agent: KMail/1.5

> > Possibly, it is needed to change eeprom_read_byte() definition
> > to int return value. This can reduce summary size. Opinions?
> This does not make sense to me. Eeprom_read_byte() is supposed to read, and
> return, a single byte. So why should it return a 16-bit int? In my mind
> this would just make it more confusing to the end user.

Agree, it was a bad idea.
More, the definition of eeprom_read_byte() as int will
decrease performance in cases, where Avr-gcc can omit
integral promotion, for example:
  if (eeprom_read_byte(&x) < 10)


reply via email to

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