aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/mandelbrot/main.c20
-rw-r--r--demos/mandelbrot/mandelbrot.c20
-rw-r--r--demos/notepad/main.c20
-rw-r--r--gfx.mk1
-rw-r--r--include/graph.h39
-rw-r--r--src/graph.c33
6 files changed, 133 insertions, 0 deletions
diff --git a/demos/mandelbrot/main.c b/demos/mandelbrot/main.c
index 45689df3..c0c699ed 100644
--- a/demos/mandelbrot/main.c
+++ b/demos/mandelbrot/main.c
@@ -1,3 +1,23 @@
+/*
+ ChibiOS/GFX - Copyright (C) 2012
+ Joel Bodenmann aka Tectu <joel@unormal.org>
+
+ This file is part of ChibiOS/GFX.
+
+ ChibiOS/GFX is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/GFX is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "ch.h"
#include "hal.h"
#include "gdisp.h"
diff --git a/demos/mandelbrot/mandelbrot.c b/demos/mandelbrot/mandelbrot.c
index 2ae2e9da..70417ffa 100644
--- a/demos/mandelbrot/mandelbrot.c
+++ b/demos/mandelbrot/mandelbrot.c
@@ -1,3 +1,23 @@
+/*
+ ChibiOS/GFX - Copyright (C) 2012
+ Joel Bodenmann aka Tectu <joel@unormal.org>
+
+ This file is part of ChibiOS/GFX.
+
+ ChibiOS/GFX is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/GFX is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "ch.h"
#include "hal.h"
#include "gdisp.h"
diff --git a/demos/notepad/main.c b/demos/notepad/main.c
index 40071719..b84ff2db 100644
--- a/demos/notepad/main.c
+++ b/demos/notepad/main.c
@@ -1,3 +1,23 @@
+/*
+ ChibiOS/GFX - Copyright (C) 2012
+ Joel Bodenmann aka Tectu <joel@unormal.org>
+
+ This file is part of ChibiOS/GFX.
+
+ ChibiOS/GFX is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/GFX is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include "ch.h"
#include "hal.h"
#include "gdisp.h"
diff --git a/gfx.mk b/gfx.mk
index 4e16c16f..ec28df30 100644
--- a/gfx.mk
+++ b/gfx.mk
@@ -7,5 +7,6 @@ GFXSRC += $(GFXLIB)/src/gdisp.c \
$(GFXLIB)/src/gdisp_fonts.c \
$(GFXLIB)/src/touchpad.c \
$(GFXLIB)/src/console.c \
+ $(GFXLIB)/src/graph.c \
GFXINC += $(GFXLIB)/include
diff --git a/include/graph.h b/include/graph.h
new file mode 100644
index 00000000..e0e0622b
--- /dev/null
+++ b/include/graph.h
@@ -0,0 +1,39 @@
+/*
+ ChibiOS/GFX - Copyright (C) 2012
+ Joel Bodenmann aka Tectu <joel@unormal.org>
+
+ This file is part of ChibiOS/GFX.
+
+ ChibiOS/GFX is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/GFX is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef GRAPH_H
+#define GRAPH_H
+
+#if GFX_USE_GRAPH
+
+typedef struct _Graph {
+ coord_t x0;
+ coord_t y0;
+ coord_t x1;
+ coord_t y1;
+ uint16_t grid_size;
+ bool_t full_grid;
+ color_t color;
+} Graph;
+
+#endif /* GFX_USE_GRAPH */
+
+#endif
+
diff --git a/src/graph.c b/src/graph.c
new file mode 100644
index 00000000..9fd3984f
--- /dev/null
+++ b/src/graph.c
@@ -0,0 +1,33 @@
+/*
+ ChibiOS/GFX - Copyright (C) 2012
+ Joel Bodenmann aka Tectu <joel@unormal.org>
+
+ This file is part of ChibiOS/GFX.
+
+ ChibiOS/GFX is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/GFX is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "ch.h"
+#include "hal.h"
+#include "gdisp.h"
+#include "graph.h"
+
+#if GFX_USE_GRAPH
+
+gfxGraphInit(struct graph_t *g) {
+ (void)g;
+}
+
+#endif /* GFX_USE_GRAPH */
+