Global.h 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*********************************************************************
  2. * SEGGER MICROCONTROLLER GmbH & Co. KG *
  3. * Solutions for real time microcontroller applications *
  4. **********************************************************************
  5. * *
  6. * (c) 2015 - 2016 SEGGER Microcontroller GmbH & Co. KG *
  7. * *
  8. * www.segger.com Support: support@segger.com *
  9. * *
  10. **********************************************************************
  11. * *
  12. * SEGGER SystemView * Real-time application analysis *
  13. * *
  14. **********************************************************************
  15. * *
  16. * All rights reserved. *
  17. * *
  18. * * This software may in its unmodified form be freely redistributed *
  19. * in source form. *
  20. * * The source code may be modified, provided the source code *
  21. * retains the above copyright notice, this list of conditions and *
  22. * the following disclaimer. *
  23. * * Modified versions of this software in source or linkable form *
  24. * may not be distributed without prior consent of SEGGER. *
  25. * *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND *
  27. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, *
  28. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
  29. * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL *
  30. * SEGGER Microcontroller BE LIABLE FOR ANY DIRECT, INDIRECT, *
  31. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
  32. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS *
  33. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
  34. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, *
  35. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
  36. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
  37. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
  38. * *
  39. **********************************************************************
  40. * *
  41. * SystemView version: V2.40 *
  42. * *
  43. **********************************************************************
  44. ----------------------------------------------------------------------
  45. File : Global.h
  46. Purpose : Global types
  47. In case your application already has a Global.h, you should
  48. merge the files. In order to use Segger code, the types
  49. U8, U16, U32, I8, I16, I32 need to be defined in Global.h;
  50. additional definitions do not hurt.
  51. ---------------------------END-OF-HEADER------------------------------
  52. */
  53. #ifndef GLOBAL_H // Guard against multiple inclusion
  54. #define GLOBAL_H
  55. #define U8 unsigned char
  56. #define U16 unsigned short
  57. #define U32 unsigned long
  58. #define I8 signed char
  59. #define I16 signed short
  60. #define I32 signed long
  61. #ifdef _WIN32
  62. //
  63. // Microsoft VC6 compiler related
  64. //
  65. #define U64 unsigned __int64
  66. #define U128 unsigned __int128
  67. #define I64 __int64
  68. #define I128 __int128
  69. #if _MSC_VER <= 1200
  70. #define U64_C(x) x##UI64
  71. #else
  72. #define U64_C(x) x##ULL
  73. #endif
  74. #else
  75. //
  76. // C99 compliant compiler
  77. //
  78. #define U64 unsigned long long
  79. #define I64 signed long long
  80. #define U64_C(x) x##ULL
  81. #endif
  82. #endif // Avoid multiple inclusion
  83. /*************************** End of file ****************************/