at32f413_def.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /**
  2. **************************************************************************
  3. * @file at32f413_def.h
  4. * @brief at32f413 macros header file
  5. **************************************************************************
  6. * Copyright notice & Disclaimer
  7. *
  8. * The software Board Support Package (BSP) that is made available to
  9. * download from Artery official website is the copyrighted work of Artery.
  10. * Artery authorizes customers to use, copy, and distribute the BSP
  11. * software and its related documentation for the purpose of design and
  12. * development in conjunction with Artery microcontrollers. Use of the
  13. * software is governed by this copyright notice and the following disclaimer.
  14. *
  15. * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
  16. * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
  17. * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
  18. * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
  19. * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
  20. * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
  21. *
  22. **************************************************************************
  23. */
  24. /* Define to prevent recursive inclusion -------------------------------------*/
  25. #ifndef __AT32F413_DEF_H
  26. #define __AT32F413_DEF_H
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. /* gnu compiler */
  31. #if defined (__GNUC__)
  32. #ifndef ALIGNED_HEAD
  33. #define ALIGNED_HEAD
  34. #endif
  35. #ifndef ALIGNED_TAIL
  36. #define ALIGNED_TAIL __attribute__ ((aligned (4)))
  37. #endif
  38. #endif
  39. /* arm compiler */
  40. #if defined (__CC_ARM)
  41. #ifndef ALIGNED_HEAD
  42. #define ALIGNED_HEAD __align(4)
  43. #endif
  44. #ifndef ALIGNED_TAIL
  45. #define ALIGNED_TAIL
  46. #endif
  47. #endif
  48. /* iar compiler */
  49. #if defined (__ICCARM__)
  50. #ifndef ALIGNED_HEAD
  51. #define ALIGNED_HEAD
  52. #endif
  53. #ifndef ALIGNED_TAIL
  54. #define ALIGNED_TAIL
  55. #endif
  56. #endif
  57. #define UNUSED(x) (void)x /* to avoid gcc/g++ warnings */
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif