Subversion Repositories Projects

Rev

Blame | Last modification | View Log | RSS feed

/**
*************************************************************************************************************
*
*       \file types.h
*       This file contains all generic type definitions that are used independendly of the project.
*       The type definitions of this file should be used instead of the standard C-types to simplify
*       porting of a particular software project.
*
*   \author         Ralf Hochhausen
*   \date           22.04.2006
*   \version        1.1
*
*   (c) 2006 by Ralf Hochhausen (e-mail: micro@ralf-hochhausen.de)
*
*   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 2
*   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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*
*   \b History:
*
*   22.04.2006      Ralf Hochhausen\n
*                   Revision 1.1\n
*                   Included GPL header
*
*************************************************************************************************************
*/


/**
*       \defgroup TYPES Generic Type Definitions
*       @{
*/


#ifndef __TYPES_H
#define __TYPES_H

#define         NULL    (void*)0                /**< NULL-pointer definition */

/**
*       Boolean type enumeration
*      
*       \note
*       Enumeration type is used here to simplify debugging of the software. Most debuggers will
*       show the text "TRUE" or "FALSE" instead of "1" and "0". It should be noticed that
*       enumeration types are normally 16bit wide => the compiler should be forced to use 8bit
*       to safe RAM memory space if possible.
*
*/

typedef enum
{
        FALSE,                  /**< FALSE      -> 0 */
        TRUE                    /**< TRUE       -> 1 */
}BOOL;

/* Type definition of unsigned Datatypes */
typedef unsigned char   uchar8;         /**<  8Bit unsigned Datatype */
typedef unsigned int    uint16;         /**< 16Bit unsigned Datatype */
typedef unsigned long   ulong32;        /**< 32Bit unsigned Datatype */

/* Type definitions of signed Datatypes */
typedef signed char     char8;          /**<  8Bit signed Datatype */
typedef signed int              int16;          /**< 16Bit signed Datatype */
typedef signed long     long32;         /**< 32Bit signed Datatype */

/**
*       @}
*/


#endif /* ifdef __TYPES_H */