# HG changeset patch # User jeandet # Date 2013-10-04 14:14:07 # Node ID 836356bc2be75595c7e6df890e6d063ed694f98b # Parent 104125d87b8982443ddd0ea32a8816faf5c332a9 sync diff --git a/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843.c b/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843.c new file mode 100644 --- /dev/null +++ b/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843.c @@ -0,0 +1,52 @@ +/*------------------------------------------------------------------------------ +-- This file is a part of the libuc, microcontroler library +-- Copyright (C) 2013, Alexis Jeandet +-- +-- 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, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +------------------------------------------------------------------------------- +-- Author : Alexis Jeandet +-- Mail : alexis.jeandet@member.fsf.org +-------------------------------------------------------------------------------*/ + +#include + +int ads7843init(ADS7843_t *dev, spi_t spidev) +{ + dev->spidev = spidev; + return 1; +} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843.pro b/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843.pro new file mode 100644 --- /dev/null +++ b/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs +CONFIG += ordered + +SUBDIRS += ./ADS7843_STM32F4.pro \ + ./ADS7843_SIMULATOR.pro diff --git a/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843_SIMULATOR.pro b/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843_SIMULATOR.pro new file mode 100644 --- /dev/null +++ b/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843_SIMULATOR.pro @@ -0,0 +1,23 @@ +TEMPLATE = lib +TARGET = ADS7843 + +SOURCES += \ + ADS7843.c + +INCLUDEPATH += ../../../../includes \ + ../../../../includes/GRAPHIC/CONTROLERS \ + ../../../../includes/GRAPHIC/TC_CONTROLERS \ + ../../../../includes/GRAPHIC/GUI/FONTS \ + ../../../../includes/GRAPHIC/GUI/Widgets + + +UCMODEL=simulator + +target.path = $$[QT_INSTALL_LIBS]/$$UCMODEL +INSTALLS += target + +HEADERS += \ + ../../../../includes/GRAPHIC/TC_CONTROLERS/ADS7843.h \ + ../../../../includes/GRAPHIC/TC_CONTROLERS/genericTC_Controler.h + + diff --git a/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843_STM32F4.pro b/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843_STM32F4.pro new file mode 100644 --- /dev/null +++ b/lib/src/common/GRAPHIC/TC_CONTROLERS/ADS7843/ADS7843_STM32F4.pro @@ -0,0 +1,27 @@ +TEMPLATE = lib +TARGET = ADS7843 + +SOURCES += \ + ADS7843.c + +DEFINES -= __OPTIMIZED_MATH + +INCLUDEPATH += ../../../../includes \ + ../../../CPU/STM32F4xx_StdPeriph_Driver/inc \ + ../../../CPU/CMSIS/Include \ + ../../../../includes/GRAPHIC/CONTROLERS \ + ../../../../includes/GRAPHIC/TC_CONTROLERS \ + ../../../../includes/GRAPHIC/GUI/FONTS \ + ../../../../includes/GRAPHIC/GUI/Widgets + + +UCMODEL=stm32f4 + +target.path = $$[QT_INSTALL_LIBS]/$$UCMODEL +INSTALLS += target + +HEADERS += \ + ../../../../includes/GRAPHIC/TC_CONTROLERS/ADS7843.h \ + ../../../../includes/GRAPHIC/TC_CONTROLERS/genericTC_Controler.h + + diff --git a/lib/src/common/GRAPHIC/TC_CONTROLERS/TC_CONTROLERS.pro b/lib/src/common/GRAPHIC/TC_CONTROLERS/TC_CONTROLERS.pro --- a/lib/src/common/GRAPHIC/TC_CONTROLERS/TC_CONTROLERS.pro +++ b/lib/src/common/GRAPHIC/TC_CONTROLERS/TC_CONTROLERS.pro @@ -1,5 +1,6 @@ TEMPLATE = subdirs -SUBDIRS += STMPE811 +SUBDIRS += STMPE811 \ + ADS7843 diff --git a/lib/src/includes/GRAPHIC/TC_CONTROLERS/ADS7843.h b/lib/src/includes/GRAPHIC/TC_CONTROLERS/ADS7843.h new file mode 100644 --- /dev/null +++ b/lib/src/includes/GRAPHIC/TC_CONTROLERS/ADS7843.h @@ -0,0 +1,61 @@ +/*------------------------------------------------------------------------------ +-- This file is a part of the libuc, microcontroler library +-- Copyright (C) 2013, Alexis Jeandet +-- +-- 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, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +------------------------------------------------------------------------------- +-- Author : Alexis Jeandet +-- Mail : alexis.jeandet@member.fsf.org +-------------------------------------------------------------------------------*/ +#ifndef STMPE811_H +#define STMPE811_H +#include +#include +#include +#include +#include +#include + +typedef struct ADS7843_t +{ + spi_t spidev; +}ADS7843_t; + + +extern int ads7843init(ADS7843_t *dev, spi_t spidev); +extern int ads7843read(ADS7843_t *dev,int* x,int* y); + + + +#endif + + + + + + + + + + + + + + + + + + +