Contiki 2.6

stm32f10x_type.h

00001 /******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
00002 * File Name          : stm32f10x_type.h
00003 * Author             : MCD Application Team
00004 * Version            : V2.0.3
00005 * Date               : 09/22/2008
00006 * Description        : This file contains all the common data types used for the
00007 *                      STM32F10x firmware library.
00008 ********************************************************************************
00009 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00010 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
00011 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
00012 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
00013 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
00014 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00015 *******************************************************************************/
00016 
00017 /* Define to prevent recursive inclusion -------------------------------------*/
00018 #ifndef __STM32F10x_TYPE_H
00019 #define __STM32F10x_TYPE_H
00020 
00021 /* Includes ------------------------------------------------------------------*/
00022 /* Exported types ------------------------------------------------------------*/
00023 typedef signed long  s32;
00024 typedef signed short s16;
00025 typedef signed char  s8;
00026 
00027 typedef signed long  const sc32;  /* Read Only */
00028 typedef signed short const sc16;  /* Read Only */
00029 typedef signed char  const sc8;   /* Read Only */
00030 
00031 typedef volatile signed long  vs32;
00032 typedef volatile signed short vs16;
00033 typedef volatile signed char  vs8;
00034 
00035 typedef volatile signed long  const vsc32;  /* Read Only */
00036 typedef volatile signed short const vsc16;  /* Read Only */
00037 typedef volatile signed char  const vsc8;   /* Read Only */
00038 
00039 typedef unsigned long  u32;
00040 typedef unsigned short u16;
00041 typedef unsigned char  u8;
00042 
00043 typedef unsigned long  const uc32;  /* Read Only */
00044 typedef unsigned short const uc16;  /* Read Only */
00045 typedef unsigned char  const uc8;   /* Read Only */
00046 
00047 typedef volatile unsigned long  vu32;
00048 typedef volatile unsigned short vu16;
00049 typedef volatile unsigned char  vu8;
00050 
00051 typedef volatile unsigned long  const vuc32;  /* Read Only */
00052 typedef volatile unsigned short const vuc16;  /* Read Only */
00053 typedef volatile unsigned char  const vuc8;   /* Read Only */
00054 
00055 typedef enum {FALSE = 0, TRUE = !FALSE} bool;
00056 
00057 typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
00058 
00059 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
00060 #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
00061 
00062 typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
00063 
00064 #define U8_MAX     ((u8)255)
00065 #define S8_MAX     ((s8)127)
00066 #define S8_MIN     ((s8)-128)
00067 #define U16_MAX    ((u16)65535u)
00068 #define S16_MAX    ((s16)32767)
00069 #define S16_MIN    ((s16)-32768)
00070 #define U32_MAX    ((u32)4294967295uL)
00071 #define S32_MAX    ((s32)2147483647)
00072 #define S32_MIN    ((s32)-2147483648)
00073 
00074 /* Exported constants --------------------------------------------------------*/
00075 /* Exported macro ------------------------------------------------------------*/
00076 /* Exported functions ------------------------------------------------------- */
00077 
00078 #endif /* __STM32F10x_TYPE_H */
00079 
00080 /******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/