landtiger with ili9325 lcd controller based on the TFTLCD libary from Todor Todorov

Committer:
casval
Date:
Mon Jun 08 09:59:17 2015 +0000
Revision:
1:1a3dd94e13cf
Parent:
0:0099ad246127
Mutex form for other project was still there

Who changed what in which revision?

UserRevisionLine numberNew contents of line
casval 0:0099ad246127 1 /** \file helpers.h
casval 0:0099ad246127 2 * \brief Utility functions and macros.
casval 0:0099ad246127 3 * \copyright GNU Public License, v2. or later
casval 0:0099ad246127 4 *
casval 0:0099ad246127 5 * This library is based on the Arduino/chipKIT UTFT library by Henning
casval 0:0099ad246127 6 * Karlsen, http://henningkarlsen.com/electronics/library.php?id=52
casval 0:0099ad246127 7 *
casval 0:0099ad246127 8 * Copyright (C)2010-2012 Henning Karlsen. All right reserved.
casval 0:0099ad246127 9 *
casval 0:0099ad246127 10 * Copyright (C)2012 Todor Todorov.
casval 0:0099ad246127 11 *
casval 0:0099ad246127 12 * This library is free software; you can redistribute it and/or
casval 0:0099ad246127 13 * modify it under the terms of the GNU Lesser General Public
casval 0:0099ad246127 14 * License as published by the Free Software Foundation; either
casval 0:0099ad246127 15 * version 2.1 of the License, or (at your option) any later version.
casval 0:0099ad246127 16 *
casval 0:0099ad246127 17 * This library is distributed in the hope that it will be useful,
casval 0:0099ad246127 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
casval 0:0099ad246127 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
casval 0:0099ad246127 20 * Lesser General Public License for more details.
casval 0:0099ad246127 21 *
casval 0:0099ad246127 22 * You should have received a copy of the GNU Lesser General Public
casval 0:0099ad246127 23 * License along with this library; if not, write to:
casval 0:0099ad246127 24 *
casval 0:0099ad246127 25 * Free Software Foundation, Inc.
casval 0:0099ad246127 26 * 51 Franklin St, 5th Floor, Boston, MA 02110-1301, USA
casval 0:0099ad246127 27 *
casval 0:0099ad246127 28 *********************************************************************/
casval 0:0099ad246127 29 #ifndef TFTLCD_HELPERS_H
casval 0:0099ad246127 30 #define TFTLCD_HELPERS_H
casval 0:0099ad246127 31
casval 0:0099ad246127 32 #include "mbed.h"
casval 0:0099ad246127 33
casval 0:0099ad246127 34 /** \def HIGH
casval 0:0099ad246127 35 * \brief User-friendly high pin level designation.
casval 0:0099ad246127 36 */
casval 0:0099ad246127 37 #define HIGH 1
casval 0:0099ad246127 38 /** \def LOW
casval 0:0099ad246127 39 * \brief User-friendly low pin level designation.
casval 0:0099ad246127 40 */
casval 0:0099ad246127 41 #define LOW 0
casval 0:0099ad246127 42
casval 0:0099ad246127 43 /** \def swap( type, a, b )
casval 0:0099ad246127 44 * \brief Convenience macro to swap two values.
casval 0:0099ad246127 45 */
casval 0:0099ad246127 46 #define swap( type, a, b ) { type tmp = ( a ); ( a ) = ( b ); ( b ) = tmp; }
casval 0:0099ad246127 47
casval 0:0099ad246127 48 /** \def pulseLow( pin )
casval 0:0099ad246127 49 * \brief Toggles a pin low, then high.
casval 0:0099ad246127 50 */
casval 0:0099ad246127 51 #define pulseLow( pin ) pin = LOW; pin = HIGH
casval 0:0099ad246127 52
casval 0:0099ad246127 53 /** \def pulseHigh( pin )
casval 0:0099ad246127 54 * \brief Toggles a pin high, then low.
casval 0:0099ad246127 55 */
casval 0:0099ad246127 56 #define pulseHigh( pin ) pin = HIGH; pin = LOW
casval 0:0099ad246127 57
casval 0:0099ad246127 58 #ifndef ushort
casval 0:0099ad246127 59 typedef unsigned short ushort;
casval 0:0099ad246127 60 #endif
casval 0:0099ad246127 61
casval 0:0099ad246127 62 #endif /* TFTLCD_HELPERS_H */