From 288b4ec37294d20b9ff703dedbc5044089e864a6 Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Mon, 27 Jun 2005 22:24:30 +0000 Subject: [PATCH] 2005-06-27 Marcel Telka * stdint/stdint-hwbench.h: New file. * Makefile.am (noinst_HEADERS): Added stdint/stdint-hwbench.h. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@650 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- include/ChangeLog | 5 + include/Makefile.am | 1 + include/NEWS | 3 +- include/stdint/stdint-hwbench.h | 188 ++++++++++++++++++++++++++++++++ 4 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 include/stdint/stdint-hwbench.h diff --git a/include/ChangeLog b/include/ChangeLog index 7822b2ec..e37af812 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2005-06-27 Marcel Telka + + * stdint/stdint-hwbench.h: New file. + * Makefile.am (noinst_HEADERS): Added stdint/stdint-hwbench.h. + 2005-06-27 Marcel Telka * win32/stdint.h: File renamed and moved ... diff --git a/include/Makefile.am b/include/Makefile.am index 810d8969..860b3987 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -116,6 +116,7 @@ nobase_openwinceinc_HEADERS = \ std/mic.h noinst_HEADERS = \ + stdint/stdint-hwbench.h \ stdint/stdint-win32.h nodist_openwinceinc_HEADERS = \ diff --git a/include/NEWS b/include/NEWS index 11215047..65564f79 100644 --- a/include/NEWS +++ b/include/NEWS @@ -8,7 +8,8 @@ include-0.3.3: * Added Hitiachi HD64461 registers. * Added more manufacturer entries into Manufacturer's Identification Code database. * Changes in stdint.h support: - - Ported uintptr_t type to old Windows SDK (win32). + - Ported uintptr_t type to old Windows SDK (win32) + - Added stdint.h support for Hitachi Workbench (hwbench) * Changes in brux common headers: - Added new parameter (adr) for detectflash function * Added support for Hitachi Workbench. diff --git a/include/stdint/stdint-hwbench.h b/include/stdint/stdint-hwbench.h new file mode 100644 index 00000000..64d9972d --- /dev/null +++ b/include/stdint/stdint-hwbench.h @@ -0,0 +1,188 @@ +/* + * $Id$ + * + * stdint.h - integer types for Hitachi Workbench + * Copyright (C) 2005 Elcom s.r.o. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holders nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Written by Marcel Telka , 2005. + * + */ + +#ifndef STDINT_H +#define STDINT_H + +#include + +/* + * Integer Types + */ + +/* Exact-width integer types */ + +typedef signed char int8_t; +typedef short int16_t; +typedef long int32_t; +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned long uint32_t; + +/* Minimum-width integer types */ + +typedef signed char int_least8_t; +typedef short int_least16_t; +typedef long int_least32_t; +/* int_least64_t not supported */ +typedef unsigned char uint_least8_t; +typedef unsigned short uint_least16_t; +typedef unsigned long uint_least32_t; +/* uint_least64_t not supported */ + +/* Fastest minimum-width integer types */ + +typedef signed char int_fast8_t; +typedef short int_fast16_t; +typedef long int_fast32_t; +/* int_fast64_t not supported */ +typedef unsigned char uint_fast8_t; +typedef unsigned short uint_fast16_t; +typedef unsigned long uint_fast32_t; +/* uint_least64_t not supported */ + +/* Integer types capable of holding object pointers */ + +typedef long intptr_t; +typedef unsigned long uintptr_t; + +/* Greatest-width integer types */ + +typedef long intmax_t; +typedef unsigned long uintmax_t; + +/* + * Limits of Specified-Width Interger Types + */ + +/* Limits of exact-width integer types */ + +#define INT8_MIN (-127 - 1) +#define INT16_MIN (-32767 - 1) +#define INT32_MIN (-2147483647 - 1) + +#define INT8_MAX 127 +#define INT16_MAX 32767 +#define INT32_MAX 2147483647 + +#define UINT8_MAX 0xFF +#define UINT16_MAX 0xFFFF +#define UINT32_MAX 0xFFFFFFFF + +/* Limits of minimum-width integer types */ + +#define INT_LEAST8_MIN INT8_MIN +#define INT_LEAST16_MIN INT16_MIN +#define INT_LEAST32_MIN INT32_MIN + +#define INT_LEAST8_MAX INT8_MAX +#define INT_LEAST16_MAX INT16_MAX +#define INT_LEAST32_MAX INT32_MAX + +#define UINT_LEAST8_MAX UINT8_MAX +#define UINT_LEAST16_MAX UINT16_MAX +#define UINT_LEAST32_MAX UINT32_MAX + +/* Limits of fastest minimum-width integer types */ + +#define INT_FAST8_MIN INT8_MIN +#define INT_FAST16_MIN INT16_MIN +#define INT_FAST32_MIN INT32_MIN + +#define INT_FAST8_MAX INT8_MAX +#define INT_FAST16_MAX INT16_MAX +#define INT_FAST32_MAX INT32_MAX + +#define UINT_FAST8_MAX UINT8_MAX +#define UINT_FAST16_MAX UINT16_MAX +#define UINT_FAST32_MAX UINT32_MAX + +/* Limits of integer types capable of holding object pointers */ + +#define INTPTR_MIN INT32_MIN +#define INTPTR_MAX INT32_MAX +#define UINTPTR_MAX UINT32_MAX + +/* Limits of greatest-width integer types */ + +#define INTMAX_MIN INT32_MIN +#define INTMAX_MAX INT32_MAX +#define UINTMAX_MAX UINT32_MAX + +/* + * Limits of Other Integer Types + */ + +/* Limits of ptrdiff_t */ + +#define PTRDIFF_MIN INT32_MIN +#define PTRDIFF_MAX UINT32_MAX + +/* Limits of sig_atomic_t */ + +/* N/A for Hitachi Workbench */ + +/* Limit of size_t */ + +#define SIZE_MAX UINT32_MAX + +/* Limits of wchar_t */ + +#define WCHAR_MIN CHAR_MIN +#define WCHAR_MAX CHAR_MAX + +/* Limits of wint_t */ + +/* wint_t not supported in Hitachi Workbench */ + +/* + * Macros for Integer Constant Expressions + */ + +/* Macros for minimum-width integer constant expressions */ + +#define INT8_C(value) (value) +#define INT16_C(value) (value) +#define INT32_C(value) (value) + +#define UINT8_C(value) (value) +#define UINT16_C(value) (value) +#define UINT32_C(value) (value) + +/* Macros for greatest-width integer constant expressions */ + +#define INTMAX_C(value) INT32_C(value) +#define UINTMAX_C(value) UINT32_C(value) + +#endif /* STDINT_H */