nokia 6610 lcd code problem

Your source for all things Atmel.

Moderator: phalanx

Post Reply
rahuljin
Posts: 1
Joined: Tue Feb 23, 2010 7:01 am

nokia 6610 lcd code problem

Post by rahuljin » Tue Feb 23, 2010 10:16 am

i download the code for atmega8 from this link which can be used for atmega16/32 ---

Code: Select all

http://www.sparkfun.com/commerce/product_info.php?products_id=569
i tried to generate hex file in winavr20100110 but found error ----

Code: Select all

>> "make.exe" all

-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Compiling C: main.c
avr-gcc -c -mmcu=atmega16 -I. -gdwarf-2 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./main.lst  -std=gnu99 -MMD -MP -MF .dep/main.o.d main.c -o main.o 
In file included from main.c:4:
lcd_driver.h:12: error: expected declaration specifiers or '...' before 'PGM_P'
main.c: In function 'main':
main.c:35: warning: passing argument 3 of 'putstr_pgm' makes integer from pointer without a cast
main.c:35: error: too many arguments to function 'putstr_pgm'
make.exe: *** [main.o] Error 1

> Process Exit Code: 2
> Time Taken: 00:06

the error is for this line in lcd_driver.h ----

Code: Select all

uint8_t putstr_pgm(uint8_t x, uint8_t y, PGM_P p, uint8_t fg, uint8_t bg);
the second error is for this line ----

Code: Select all

putstr_pgm(10, 7, &(hello_world[0]), 0x00, 0x1C);
please help :?

Liencouer
Posts: 155
Joined: Fri Mar 28, 2008 7:36 am

Post by Liencouer » Wed Feb 24, 2010 7:12 am

lcd_driver.h:12: error: expected declaration specifiers or '...' before 'PGM_P'
lcd_driver.h doesnt know what a PGM_P is, you're missing a #include <avr/pgmspace.h>, I think.

http://www.nongnu.org/avr-libc/user-man ... space.html

tommseva7
Posts: 1
Joined: Fri Jan 29, 2010 8:03 am
Contact:

Post by tommseva7 » Thu Feb 25, 2010 4:10 am

Liencouer wrote:
lcd_driver.h:12: error: expected declaration specifiers or '...' before 'PGM_P'
lcd_driver.h doesnt know what a PGM_P is, you're missing a #include <avr/pgmspace.h>, I think.

http://www.nongnu.org/avr-libc/user-man ... space.html

ya it works..!! thanks
hi friends, I enjoy reading, walking, outdoor team sports, alternative medicine and listening to music.
[url=http://www.stretch-marks-help.com/articles/stretch-mark-removal.html]stretch mark removal[/url]

Post Reply