at32f413_def.h 2.0 KB

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