added gdisp_pictures demo
This commit is contained in:
parent
b91e619573
commit
12a6eeb91d
6148
demos/modules/gdisp/gdisp_pictures/fruits1.h
Normal file
6148
demos/modules/gdisp/gdisp_pictures/fruits1.h
Normal file
File diff suppressed because it is too large
Load Diff
BIN
demos/modules/gdisp/gdisp_pictures/fruits1.jpg
Normal file
BIN
demos/modules/gdisp/gdisp_pictures/fruits1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
43
demos/modules/gdisp/gdisp_pictures/gfxconf.h
Normal file
43
demos/modules/gdisp/gdisp_pictures/gfxconf.h
Normal file
@ -0,0 +1,43 @@
|
||||
/**
|
||||
* This file has a different license to the rest of the GFX system.
|
||||
* You can copy, modify and distribute this file as you see fit.
|
||||
* You do not need to publish your source modifications to this file.
|
||||
* The only thing you are not permitted to do is to relicense it
|
||||
* under a different license.
|
||||
*/
|
||||
|
||||
#ifndef _GFXCONF_H
|
||||
#define _GFXCONF_H
|
||||
|
||||
/* GFX sub-systems to turn on */
|
||||
#define GFX_USE_GDISP TRUE
|
||||
#define GFX_USE_GWIN FALSE
|
||||
#define GFX_USE_GEVENT FALSE
|
||||
#define GFX_USE_GTIMER FALSE
|
||||
#define GFX_USE_GINPUT FALSE
|
||||
|
||||
/* Features for the GDISP sub-system. */
|
||||
#define GDISP_NEED_VALIDATION TRUE
|
||||
#define GDISP_NEED_CLIP TRUE
|
||||
#define GDISP_NEED_TEXT TRUE
|
||||
#define GDISP_NEED_CIRCLE TRUE
|
||||
#define GDISP_NEED_ELLIPSE FALSE
|
||||
#define GDISP_NEED_ARC FALSE
|
||||
#define GDISP_NEED_SCROLL FALSE
|
||||
#define GDISP_NEED_PIXELREAD FALSE
|
||||
#define GDISP_NEED_CONTROL TRUE
|
||||
#define GDISP_NEED_MULTITHREAD TRUE
|
||||
#define GDISP_NEED_ASYNC FALSE
|
||||
#define GDISP_NEED_MSGAPI FALSE
|
||||
|
||||
/* Builtin Fonts */
|
||||
#define GDISP_INCLUDE_FONT_SMALL FALSE
|
||||
#define GDISP_INCLUDE_FONT_LARGER FALSE
|
||||
#define GDISP_INCLUDE_FONT_UI1 FALSE
|
||||
#define GDISP_INCLUDE_FONT_UI2 TRUE
|
||||
#define GDISP_INCLUDE_FONT_LARGENUMBERS TRUE
|
||||
|
||||
/* Features for the GINPUT sub-system. */
|
||||
#define GINPUT_NEED_MOUSE FALSE
|
||||
|
||||
#endif /* _GFXCONF_H */
|
26
demos/modules/gdisp/gdisp_pictures/main.c
Normal file
26
demos/modules/gdisp/gdisp_pictures/main.c
Normal file
@ -0,0 +1,26 @@
|
||||
#include "ch.h"
|
||||
#include "hal.h"
|
||||
#include "gfx.h"
|
||||
#include "matterhorn1.h"
|
||||
#include "matterhorn2.h"
|
||||
#include "fruits1.h"
|
||||
|
||||
int main(void) {
|
||||
halInit();
|
||||
chSysInit();
|
||||
|
||||
gdispInit();
|
||||
gdispSetOrientation(GDISP_ROTATE_90);
|
||||
|
||||
while(1) {
|
||||
gdispBlitArea(0, 0, fruits1.width, fruits1.height, (const pixel_t*)fruits1.pixel_data);
|
||||
chThdSleepMilliseconds(3000);
|
||||
|
||||
gdispBlitArea(0, 0, matterhorn1.width, matterhorn1.height, (const pixel_t*)matterhorn1.pixel_data);
|
||||
chThdSleepMilliseconds(3000);
|
||||
|
||||
gdispBlitArea(0, 0, matterhorn2.width, matterhorn2.height, (const pixel_t*)matterhorn2.pixel_data);
|
||||
chThdSleepMilliseconds(3000);
|
||||
}
|
||||
}
|
||||
|
BIN
demos/modules/gdisp/gdisp_pictures/matterhorn.jpg
Normal file
BIN
demos/modules/gdisp/gdisp_pictures/matterhorn.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
6465
demos/modules/gdisp/gdisp_pictures/matterhorn1.h
Normal file
6465
demos/modules/gdisp/gdisp_pictures/matterhorn1.h
Normal file
File diff suppressed because it is too large
Load Diff
5773
demos/modules/gdisp/gdisp_pictures/matterhorn2.h
Normal file
5773
demos/modules/gdisp/gdisp_pictures/matterhorn2.h
Normal file
File diff suppressed because it is too large
Load Diff
BIN
demos/modules/gdisp/gdisp_pictures/matterhorn2.jpg
Normal file
BIN
demos/modules/gdisp/gdisp_pictures/matterhorn2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
Loading…
Reference in New Issue
Block a user