shell_cmd.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /**
  14. * @file shell_cmd.h
  15. * @brief Simple CLI shell common commands header.
  16. *
  17. * @addtogroup SHELL
  18. * @{
  19. */
  20. #ifndef SHELLCMD_H
  21. #define SHELLCMD_H
  22. /*===========================================================================*/
  23. /* Module constants. */
  24. /*===========================================================================*/
  25. /*===========================================================================*/
  26. /* Module pre-compile time settings. */
  27. /*===========================================================================*/
  28. #if !defined(SHELL_CMD_EXIT_ENABLED) || defined(__DOXYGEN__)
  29. #define SHELL_CMD_EXIT_ENABLED TRUE
  30. #endif
  31. #if !defined(SHELL_CMD_INFO_ENABLED) || defined(__DOXYGEN__)
  32. #define SHELL_CMD_INFO_ENABLED TRUE
  33. #endif
  34. #if !defined(SHELL_CMD_ECHO_ENABLED) || defined(__DOXYGEN__)
  35. #define SHELL_CMD_ECHO_ENABLED TRUE
  36. #endif
  37. #if !defined(SHELL_CMD_SYSTIME_ENABLED) || defined(__DOXYGEN__)
  38. #define SHELL_CMD_SYSTIME_ENABLED TRUE
  39. #endif
  40. #if !defined(SHELL_CMD_MEM_ENABLED) || defined(__DOXYGEN__)
  41. #define SHELL_CMD_MEM_ENABLED TRUE
  42. #endif
  43. #if !defined(SHELL_CMD_THREADS_ENABLED) || defined(__DOXYGEN__)
  44. #define SHELL_CMD_THREADS_ENABLED TRUE
  45. #endif
  46. #if !defined(SHELL_CMD_TEST_ENABLED) || defined(__DOXYGEN__)
  47. #define SHELL_CMD_TEST_ENABLED TRUE
  48. #endif
  49. #if !defined(SHELL_CMD_TEST_WA_SIZE) || defined(__DOXYGEN__)
  50. #define SHELL_CMD_TEST_WA_SIZE THD_WORKING_AREA_SIZE(256)
  51. #endif
  52. /*===========================================================================*/
  53. /* Derived constants and error checks. */
  54. /*===========================================================================*/
  55. #if (SHELL_CMD_MEM_ENABLED == TRUE) && (CH_CFG_USE_MEMCORE == FALSE)
  56. #error "SHELL_CMD_MEM_ENABLED requires CH_CFG_USE_MEMCORE"
  57. #endif
  58. #if (SHELL_CMD_MEM_ENABLED == TRUE) && (CH_CFG_USE_HEAP == FALSE)
  59. #error "SHELL_CMD_MEM_ENABLED requires CH_CFG_USE_HEAP"
  60. #endif
  61. #if (SHELL_CMD_THREADS_ENABLED == TRUE) && (CH_CFG_USE_REGISTRY == FALSE)
  62. #error "SHELL_CMD_THREADS_ENABLED requires CH_CFG_USE_REGISTRY"
  63. #endif
  64. /*===========================================================================*/
  65. /* Module data structures and types. */
  66. /*===========================================================================*/
  67. /*===========================================================================*/
  68. /* Module macros. */
  69. /*===========================================================================*/
  70. /*===========================================================================*/
  71. /* External declarations. */
  72. /*===========================================================================*/
  73. #if !defined(__DOXYGEN__)
  74. extern const ShellCommand shell_local_commands[];
  75. #endif
  76. #ifdef __cplusplus
  77. extern "C" {
  78. #endif
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82. /*===========================================================================*/
  83. /* Module inline functions. */
  84. /*===========================================================================*/
  85. #endif /* SHELLCMD_H */
  86. /** @} */