diff options
Diffstat (limited to 'demos/modules/graph')
-rw-r--r-- | demos/modules/graph/gfxconf.h | 8 | ||||
-rw-r--r-- | demos/modules/graph/main.c | 10 |
2 files changed, 7 insertions, 11 deletions
diff --git a/demos/modules/graph/gfxconf.h b/demos/modules/graph/gfxconf.h index ee36fb93..f54cfe1a 100644 --- a/demos/modules/graph/gfxconf.h +++ b/demos/modules/graph/gfxconf.h @@ -28,12 +28,14 @@ #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 TRUE
-#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/graph/main.c b/demos/modules/graph/main.c index 79935083..f74ecb5d 100644 --- a/demos/modules/graph/main.c +++ b/demos/modules/graph/main.c @@ -25,8 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "ch.h"
-#include "hal.h"
#include "gfx.h"
#include "math.h"
@@ -64,11 +62,7 @@ int main(void) { GHandle gh;
uint16_t i;
- halInit();
- chSysInit();
-
- gdispInit();
- gdispClear(Black);
+ gfxInit();
gh = gwinCreateGraph(&g, 0, 0, gdispGetWidth(), gdispGetHeight());
@@ -92,7 +86,7 @@ int main(void) { gwinGraphDrawPoints(gh, data, sizeof(data)/sizeof(data[0]));
while(TRUE) {
- chThdSleepMilliseconds(100);
+ gfxSleepMilliseconds(100);
}
}
|