[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)
Regards,
Dmitry.
- [avr-libc-dev] eeprom_read_byte and clr ret_hi, Shaun Jackman, 2009/11/18
- Re: [avr-libc-dev] eeprom_read_byte and clr ret_hi, Frédéric Nadeau, 2009/11/18
- Re: [avr-libc-dev] eeprom_read_byte and clr ret_hi, Dmitry K., 2009/11/22
- RE: [avr-libc-dev] eeprom_read_byte and clr ret_hi, Weddington, Eric, 2009/11/22
- Re: [avr-libc-dev] eeprom_read_byte and clr ret_hi,
Dmitry K. <=
- [avr-libc-dev] Re: eeprom_read_byte and clr ret_hi, David Brown, 2009/11/23
- RE: [avr-libc-dev] Re: eeprom_read_byte and clr ret_hi, Weddington, Eric, 2009/11/23
- [avr-libc-dev] Re: eeprom_read_byte and clr ret_hi, David Brown, 2009/11/23
- Message not available
- Message not available
- Re: [avr-libc-dev] Re: eeprom_read_byte and clr ret_hi, Wouter van Gulik, 2009/11/24
- Re: [avr-libc-dev] Re: eeprom_read_byte and clr ret_hi, David Brown, 2009/11/24
- Re: [avr-libc-dev] Re: eeprom_read_byte and clr ret_hi, Wouter van Gulik, 2009/11/24