avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] eeprom_rb strangeness??


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] eeprom_rb strangeness??
Date: Fri, 1 Nov 2002 10:17:41 +0100
User-agent: Mutt/1.2.5i

As Thedore A. Roth wrote:

> I would think that this should be:
> 
>   unsigned char eeprom_rb (unsigned char *addr);

I'd prefer uint8_t *addr.  Both are the same, but the term "char"
mnemonically refers to a character you can display, while "uint8_t"
rather means a small integer type.  Also, since C99 now standardizes
integer types of certain bit width, we can give a good example for
what is preferable over all those home-brewn "u8" etc. data types.

Or, just use "void *".  In particular for eeprom_read_block(), this
would allow passing the address of a structure without any typecast.

Maybe uint8_t * for the single-byte operations, and void * for the
block operation(s)?

-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/




reply via email to

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