diff options
Diffstat (limited to 'demos/modules/gdisp/gdisp_basics')
-rw-r--r-- | demos/modules/gdisp/gdisp_basics/gfxconf.h | 9 | ||||
-rw-r--r-- | demos/modules/gdisp/gdisp_basics/main.c | 10 |
2 files changed, 7 insertions, 12 deletions
diff --git a/demos/modules/gdisp/gdisp_basics/gfxconf.h b/demos/modules/gdisp/gdisp_basics/gfxconf.h index f64884a0..b632f6e0 100644 --- a/demos/modules/gdisp/gdisp_basics/gfxconf.h +++ b/demos/modules/gdisp/gdisp_basics/gfxconf.h @@ -28,12 +28,13 @@ #ifndef _GFXCONF_H
#define _GFXCONF_H
+/* The operating system to use - one of these must be defined */
+#define GFX_USE_OS_CHIBIOS TRUE
+#define GFX_USE_OS_WIN32 FALSE
+#define GFX_USE_OS_POSIX FALSE
+
/* 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
diff --git a/demos/modules/gdisp/gdisp_basics/main.c b/demos/modules/gdisp/gdisp_basics/main.c index 134f2473..d7a1b5e3 100644 --- a/demos/modules/gdisp/gdisp_basics/main.c +++ b/demos/modules/gdisp/gdisp_basics/main.c @@ -25,20 +25,14 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "ch.h"
-#include "hal.h"
#include "gfx.h"
int main(void) {
coord_t width, height;
coord_t i, j;
- halInit();
- chSysInit();
-
/* Initialize and clear the display */
- gdispInit();
- gdispClear(Black);
+ gfxInit();
// Get the screen size
width = gdispGetWidth();
@@ -53,7 +47,7 @@ int main(void) { gdispDrawPixel (i, j, White);
while(TRUE) {
- chThdSleepMilliseconds(500);
+ gfxSleepMilliseconds(500);
}
}
|