[Top][All Lists]

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

RE: [avr-gcc-list] Discarded Qualifiers.

From: Daniel Williamson
Subject: RE: [avr-gcc-list] Discarded Qualifiers.
Date: Wed, 12 Mar 2003 13:57:14 -0000

David Brown Wrote>

>I think you might be best with:
>    typedef const unsigned char prog_byte PROGMEM;

>    prog_byte test_graphic[] = {16,16, ...

>    void put_graphic(unsigned char x, unsigned char y, prog_byte *data);

>Remember to use "c = PRG_RDB(data)", not "c = *data" in the implementation
>of put_graphic.

Yep that works, I'd already used the PRG_RDB(data) in there and it all
worked fine apart from the warning.

I also fount that making the argument const worked ok too.
extern void put_graphic(unsigned char x, unsigned char y, const unsigned
char *data);

I had also tried prog_uchar from pgmspace.h but as it didn't contain the
const keyword it threw out the warnings as well.


My compilation is much cleaner now.


reply via email to

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