You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

82 lines
2.9 KiB

  1. /*
  2. *********************************************************************************************************
  3. * APPLICATION CONFIGURATION
  4. *
  5. * Filename : app_cfg.h
  6. *********************************************************************************************************
  7. */
  8. #ifndef _APP_CFG_H_
  9. #define _APP_CFG_H_
  10. /*
  11. *********************************************************************************************************
  12. * uC/OS-II CPU CONFIGURATION
  13. *********************************************************************************************************
  14. */
  15. /* Kernel aware interrupt priority boundary */
  16. #define CPU_CFG_KA_IPL_BOUNDARY 4u
  17. /* STM32F4 uses 4-bits NVIC priority (bits 7:4) */
  18. #define CPU_CFG_NVIC_PRIO_BITS 4u
  19. /*
  20. *********************************************************************************************************
  21. * INCLUDE FILES
  22. *********************************************************************************************************
  23. */
  24. #include <stdio.h>
  25. /*
  26. *********************************************************************************************************
  27. * TRACE / DEBUG CONFIGURATION
  28. *********************************************************************************************************
  29. */
  30. #ifndef TRACE_LEVEL_OFF
  31. #define TRACE_LEVEL_OFF 0u
  32. #endif
  33. #ifndef TRACE_LEVEL_INFO
  34. #define TRACE_LEVEL_INFO 1u
  35. #endif
  36. #ifndef TRACE_LEVEL_DBG
  37. #define TRACE_LEVEL_DBG 2u
  38. #endif
  39. #define APP_TRACE_LEVEL TRACE_LEVEL_OFF
  40. #define APP_TRACE printf
  41. #define APP_TRACE_INFO(x) ((APP_TRACE_LEVEL >= TRACE_LEVEL_INFO) ? (void)(APP_TRACE x) : (void)0)
  42. #define APP_TRACE_DBG(x) ((APP_TRACE_LEVEL >= TRACE_LEVEL_DBG) ? (void)(APP_TRACE x) : (void)0)
  43. /*
  44. *********************************************************************************************************
  45. * TASK PRIORITIES
  46. *********************************************************************************************************
  47. */
  48. #define APP_TASK_START_PRIO 5u
  49. #define APP_TASK_LED_PRIO 6u
  50. #define APP_TASK_MODBUS_PRIO 4u
  51. #define OS_TASK_TMR_PRIO (OS_LOWEST_PRIO - 2u)
  52. /*
  53. *********************************************************************************************************
  54. * TASK STACK SIZES
  55. *********************************************************************************************************
  56. */
  57. #define APP_TASK_START_STK_SIZE 128u
  58. #define APP_TASK_LED_STK_SIZE 128u
  59. #endif