aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/README24
-rwxr-xr-xdemos/console/main.c51
-rwxr-xr-xdemos/drawing/main.c48
-rwxr-xr-xdemos/gui/main.c79
-rwxr-xr-xdemos/powermodes/main.c55
5 files changed, 0 insertions, 257 deletions
diff --git a/demos/README b/demos/README
deleted file mode 100644
index 3d3d6013..00000000
--- a/demos/README
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2012
- Joel Bodenmann aka Tectu <joel@unormal.org>
-
- This file is part of ChibiOS-LCD-Driver.
-
- ChibiOS-LCD-Driver 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-LCD-Driver 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/>.
-*/
-
-This are a few demos, showing how to use the library.
-
-Please note that this are not compilable projects.
-
diff --git a/demos/console/main.c b/demos/console/main.c
deleted file mode 100755
index b8ccd633..00000000
--- a/demos/console/main.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2012
- Joel Bodenmann aka Tectu <joel@unormal.org>
-
- This file is part of ChibiOS-LCD-Driver.
-
- ChibiOS-LCD-Driver 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-LCD-Driver 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 "glcd.h"
-#include "test.h"
-#include "console.h"
-
-static GLCDDriver GLCDD1;
-static GLCDConsole CON1;
-
-int main(void) {
- halInit();
- chSysInit();
-
- // init LCD and clear it
- lcdInit(&GLCDD1);
- lcdClear(Black);
-
- // init console
- lcdConsoleInit(&CON1, 0, 0, lcdGetWidth(), lcdGetHeight(), font_Small, Black, White);
-
- // use test thread for console output
- TestThread((BaseSequentialStream*)&CON1);
-
- while (TRUE) {
-
- chThdSleepMilliseconds(200);
- }
-
- return 0;
-}
-
diff --git a/demos/drawing/main.c b/demos/drawing/main.c
deleted file mode 100755
index 391b0786..00000000
--- a/demos/drawing/main.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2012
- Joel Bodenmann aka Tectu <joel@unormal.org>
-
- This file is part of ChibiOS-LCD-Driver.
-
- ChibiOS-LCD-Driver 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-LCD-Driver 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 "glcd.h"
-
-static GLCDDriver GLCDD1;
-
-int main(void) {
- halInit();
- chSysInit();
-
- lcdInit(&GLCDD1);
- lcdClear(Black);
- lcdDrawString(100, 100, "Hello World", White, Black);
-
- lcdMoveCursor(10,10,White, Black);
- chprintf((BaseSequentialStream *)&GLCDD1, "chTimeNow: %d", chTimeNow());
-
- lcdDrawCircle(150, 150, 10, filled, Green);
- lcdDrawLine(0, 0, lcdGetWidth(), lcdGetHeight(), Yellow);
-
- while (TRUE) {
-
- chThdSleepMilliseconds(200);
- }
-
- return 0;
-}
-
diff --git a/demos/gui/main.c b/demos/gui/main.c
deleted file mode 100755
index ca1a499b..00000000
--- a/demos/gui/main.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2012
- Joel Bodenmann aka Tectu <joel@unormal.org>
-
- This file is part of ChibiOS-LCD-Driver.
-
- ChibiOS-LCD-Driver 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-LCD-Driver 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 "gui.h"
-#include "glcd.h"
-#include "touchpad.h"
-
-// GLCD driver object
-static GLCDDriver GLCDD1;
-
-int main(void) {
- uint8_t setActive, setState, clearActive, clearState;
-
- halInit();
- chSysInit();
-
- // Initializes the LCD
- lcdInit(&GLCDD1);
-
- // Initializes the touchpad
- tpInit(&SPID1);
-
- // clear the entire LCD screen
- lcdClear(Black);
-
- // Initializes the GUI thread
- // 10ms interval
- // HIGHPRIO thread priority level
- guiInit(10, HIGHPRIO);
-
- // set the following buttons to active
- // buttons wouldn't have any effect if you set these variables to 'inactive'
- setActive = active;
- clearActive = active;
-
- // draw a button to set, and one to clear the LED
- guiDrawButton(10, 10, 60, 60, "Set", font_Larger, Black, Yellow, 6, "SetButton", &setActive, &setState);
- guiDrawButton(70, 10, 120, 60, "Clear", font_Larger, Black, Red, 6, "ClearButton", &clearActive, &clearState);
-
- // you can delete a GUI element at any time from the GUI. You have to pass the GUI element name here.
- // please note that you have to redraw the screen to delete the element yourself.
- // guiDeleteElement("SetButton");
- // guiDeleteElement("ClearButton");
-
- while (TRUE) {
-
- // check if button 'set' is pressed
- if(setState)
- palSetPad(GPIOD, GPIOD_LED3);
-
- // check if button 'clear' is pressed
- if(clearState)
- palClearPad(GPIOD, GPIOD_LED3);
-
- chThdSleepMilliseconds(200);
- }
-
- return 0;
-}
-
diff --git a/demos/powermodes/main.c b/demos/powermodes/main.c
deleted file mode 100755
index 8a138d06..00000000
--- a/demos/powermodes/main.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2012
- Joel Bodenmann aka Tectu <joel@unormal.org>
-
- This file is part of ChibiOS-LCD-Driver.
-
- ChibiOS-LCD-Driver 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-LCD-Driver 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 "glcd.h"
-
-static GLCDDriver GLCDD1;
-
-int main(void) {
- halInit();
- chSysInit();
-
- lcdInit(&GLCDD1);
- lcdClear(Black);
- lcdDrawString(100, 100, "Hello World", White, Black);
-
- // wait two seconds to see current LCD content
- chThdSleepSeconds(2);
-
- // brings LCD to sleep mode
- lcdSetPowerMode(sleepOn);
-
- // wait two seconds to see current LCD content
- chThdSleepSeconds(2);
-
- // brings LCD back from sleep mode
- // content displayed before gets displayed again
- lcdSetPowerMode(sleepOff);
-
- while (TRUE) {
-
- chThdSleepMilliseconds(200);
- }
-
- return 0;
-}
-
href='#n553'>553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685