/*##############################################################*/
/* */
/* File : tft_test.c */
/* */
/* Project : TFT for Raspberry Pi Revision 2 */
/* */
/* Date : 2014-08-14 last update: 2014-08-14 */
/* */
/* Author : Hagen Ploog */
/* Kai Gillmann */
/* Timo Pfander */
/* */
/* IDE : Geany 1.22 */
/* Compiler : gcc (Debian 4.6.3-14+rpi1) 4.6.3 */
/* */
/* Copyright (C) 2013 admatec GmbH */
/* */
/* */
/* Description : */
/* */
/* This file contains the main loop. The main loop uses the */
/* functions from examples.h to demonstrate different kind */
/* of opportunities. */
/* */
/* */
/* License: */
/* */
/* This program 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. */
/* */
/* This program 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 . */
/* */
/* */
/* Revision History: */
/* */
/* Version 1.0 - Initial release */
/* */
/* */
/* */
/*##############################################################*/
#include
#include
#include
#include
#include "tft.h"
//#include "RAIO8870.h"
#include "bmp.h"
#include "examples.h"
int main( int argc, char **argv )
{
char my_filename[] = "../bmp/admatec.bmp";
if (!bcm2835_init())
return 1;
TFT_init_board();
TFT_hard_reset();
RAIO_init();
RAIO_SetBacklightPWMValue( 255 );
// draw with RAIO
// ---------------------------------------------
example_DrawWithRAIO();
delay(5000);
// delete screen and write text
// ---------------------------------------------
example_WriteText( "C-Berry" );
delay(5000);
// draw sinus
// ---------------------------------------------
example_DrawFunction( SIN );
delay(5000);
// test soft buttons
// ---------------------------------------------
example_Touch();
// depict a BMP file
// -------- -------------------------------------
example_DepictBMP( &my_filename[0] );
delay(5000);
bcm2835_close();
return 0;
}