rtconfig_project.h 1.0 KB

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-03-27 xuzhuoyi the first version
  9. * 2022-08-22 guyunjie remove data types other than 8bit for compatibility with libc
  10. */
  11. #ifndef __RTCONFIG_PROJECT_H__
  12. #define __RTCONFIG_PROJECT_H__
  13. /* C28X does not support 8bit data type by hardward (char = 16bit) so
  14. * 8bit data types are not defined in its standard libs. We define them
  15. * here. Be careful that the 8bit is actually 16bit. */
  16. #define UINT8_MAX 0xff /**< Maximum number of UINT8 */
  17. typedef signed char int8_t; /**< 8bit integer type */
  18. typedef unsigned char uint8_t; /**< 8bit unsigned integer type */
  19. /* C28X automatically disable interrupt in interrupt service routine.
  20. * We need to enable manually to allow for interrupt nesting by calling
  21. * this macro at the start of preemptible interrupt service routines*/
  22. #define ALLOW_ISR_PREEMPT() __asm(" CLRC INTM")
  23. #endif