Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I'm using atmel studio 6.1 with a code containing but on compilation conpiler gives error as mentioned above and after googling error,I found that this variable progmem has been depriciated,but no solution for fixing it. so anyone can plz help me? I'm writing this code for ATmega32 to control GLCD JHD12864E. excerpt of code

#ifndef _FONT_H_
#define _FONT_H_
#define __PROG_TYPES_COMPAT__
#include "avr/pgmspace.h"
#include "types.h"

//Constants
#define FONT_OFFSET_WIDTH 2
#define FONT_OFFSET_HEIGHT 3
#define FONT_OFFSET_FIRSTCHAR 4
#define FONT_OFFSET_CHARCOUNT 5
#define FONT_OFFSET_WTABLE 6

//Main Selected Font
const __progmem__ *font;

//Functions
void __GFXInitFont();

UINT8 GFXGetFontHeight();

UINT8 __GFXReadFontData(UINT16 add);

UINT8 __GFXReadPGM(const __progmem__ *ptr);

void GFXSetFont(const __progmem__ *new_font);

#endif
share|improve this question
 
Since the type specifier/qualifier is deprecated, and your toolchain doesn't understand it, have you tried ... removing it? This code would be more portable if it defined a macro called PROGMEM which conditionally expands to nothing or to __progmem__. Perhaps there is a header file which defines __progmem__. –  Kaz Aug 30 '13 at 6:30
 
Did you have a link to the LCD library you can post? As Kaz said you can probably remove it but in this case you'll need to add a datatype as well, possibly something like void or uint8_t would do depending on how the library is written. –  PeterJ Aug 30 '13 at 6:58
 
Yes, there is a header file for that: <avr/pgmspace.h>. It looks like PGM_P is the data type you are looking for. –  Hanno Binder Aug 30 '13 at 8:42
 
@PeterJ Progfx provides this library for GLCD whose font.h lib contains this variable type Link for same is progfx.org/download –  shafeeq Aug 30 '13 at 9:59
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.