Hello Richard,
Thanks a lot for your suggestion.
>Yes we can and it has already been suggested: Define Your own abstract data
>type with an underlying 32 bit integer. You can even overload all operators
>for it to achieve full >pointer semantics. But I would not go so far and
>overload the dereferencing operator for readability reasons. The signature for
>Your read function would then look like:
>void ReadXFlashBlock (unsigned char* dst, FlashAddress src, unsigned int size);
>If templates are Your friends, You can go further and add the value type to
>Your abstract address type.
>This way You avoid ugly casting orgies everywhere in Your code and You can not
>mess up integers, internal memory pointers and external flash addresses. Ok,
>these are >features of avr-g++, but why not?
I do not know if there will be any code over head due to C++. Unfortunately my
forte is 'C'. Can I trouble you for some examples/sample code please? Thank you
once again.
Regards
Nayani
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list