HeRman-C / u8glib

Automatically exported from code.google.com/p/u8glib
Other
0 stars 0 forks source link

drawXBMP example for AVR Studio #292

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I am not able to run a simple code to show the bitmap on 128x64 display
2. the display is working, I am able to draw and write
3.

What is the expected output? What do you see instead?
the error is
../LCD128x64.c:239: error: 'u8g_t' has no member named 'drawXBMP'

What version of the product are you using? On what operating system?
AVR Studio 4.18
u8glib_avr_v1.16

Please provide any additional information below.

#include "u8g.h"
#include <avr/io.h>
#include <avr/interrupt.h>

.....

u8g_t u8g;

// my definition of bitmap is

#define u8g_logo_width 38
#define u8g_logo_height 24
static unsigned char u8g_logo_bits[] = {
   0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xe0, 0xe0,
   0xff, 0xff, 0x3f, 0xe3, 0xe1, 0xff, 0xff, 0x3f, 0xf3, 0xf1, 0xff, 0xff,
   0x3f, 0xf3, 0xf1, 0xfe, 0xbf, 0x37, 0xf3, 0x11, 0x1c, 0x1f, 0x30, 0xf3,
   0x01, 0x08, 0x8c, 0x20, 0xf3, 0x01, 0x00, 0xc0, 0x39, 0xf3, 0x81, 0xc7,
   0xc1, 0x39, 0xf3, 0xc1, 0xc7, 0xc9, 0x38, 0xf3, 0xc1, 0xc3, 0x19, 0x3c,
   0xe3, 0x89, 0x01, 0x98, 0x3f, 0xc7, 0x18, 0x00, 0x08, 0x3e, 0x0f, 0x3c,
   0x70, 0x1c, 0x30, 0x3f, 0xff, 0xfc, 0x87, 0x31, 0xff, 0xff, 0xbf, 0xc7,
   0x23, 0x01, 0x00, 0x00, 0xc6, 0x23, 0x03, 0x00, 0x00, 0x0e, 0x30, 0xff,
   0xff, 0x3f, 0x1f, 0x3c, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0xff, 0x3f,
   0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f };

#define u8g_logo_width 38
#define u8g_logo_height 24
static unsigned char u8g_logo_bits[] PROGMEM = {
   0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xe0, 0xe0,
   0xff, 0xff, 0x3f, 0xe3, 0xe1, 0xff, 0xff, 0x3f, 0xf3, 0xf1, 0xff, 0xff,
   0x3f, 0xf3, 0xf1, 0xfe, 0xbf, 0x37, 0xf3, 0x11, 0x1c, 0x1f, 0x30, 0xf3,
   0x01, 0x08, 0x8c, 0x20, 0xf3, 0x01, 0x00, 0xc0, 0x39, 0xf3, 0x81, 0xc7,
   0xc1, 0x39, 0xf3, 0xc1, 0xc7, 0xc9, 0x38, 0xf3, 0xc1, 0xc3, 0x19, 0x3c,
   0xe3, 0x89, 0x01, 0x98, 0x3f, 0xc7, 0x18, 0x00, 0x08, 0x3e, 0x0f, 0x3c,
   0x70, 0x1c, 0x30, 0x3f, 0xff, 0xfc, 0x87, 0x31, 0xff, 0xff, 0xbf, 0xc7,
   0x23, 0x01, 0x00, 0x00, 0xc6, 0x23, 0x03, 0x00, 0x00, 0x0e, 0x30, 0xff,
   0xff, 0x3f, 0x1f, 0x3c, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0xff, 0x3f,
   0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f };

//in the draw() is used
u8g.drawXBMP( &u8g, 0, 0, u8g_logo_width, u8g_logo_height, u8g_logo_bits);

Original issue reported on code.google.com by pedro35....@gmail.com on 20 Oct 2014 at 5:31

GoogleCodeExporter commented 8 years ago
u8g_DrawXBMP

You must use the C interface.

Original comment by olikr...@gmail.com on 20 Oct 2014 at 8:19

GoogleCodeExporter commented 8 years ago
May I ask you to correct the wrong part in the code fraction. I can write text, 
values, line rectangles, but not the bmp picture.

Original comment by pedro35....@gmail.com on 20 Oct 2014 at 8:36

GoogleCodeExporter commented 8 years ago
//in the draw() is used
u8g_DrawXBMP( &u8g, 0, 0, u8g_logo_width, u8g_logo_height, u8g_logo_bits);

Original comment by olikr...@gmail.com on 21 Oct 2014 at 3:20

GoogleCodeExporter commented 8 years ago
Thank you very much.

Original comment by pedro35....@gmail.com on 21 Oct 2014 at 4:53

GoogleCodeExporter commented 8 years ago

Original comment by olikr...@gmail.com on 13 Dec 2014 at 5:21