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.

pcount3D_dss.h 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /**
  2. * @file pcount3D_dss.h
  3. *
  4. * @brief
  5. * This is the main header file for the 3D people counting Demo on DSS.
  6. *
  7. * \par
  8. * NOTE:
  9. * (C) Copyright 2016 Texas Instruments, Inc.
  10. *
  11. * Redistribution and use in source and binary forms, with or without
  12. * modification, are permitted provided that the following conditions
  13. * are met:
  14. *
  15. * Redistributions of source code must retain the above copyright
  16. * notice, this list of conditions and the following disclaimer.
  17. *
  18. * Redistributions in binary form must reproduce the above copyright
  19. * notice, this list of conditions and the following disclaimer in the
  20. * documentation and/or other materials provided with the
  21. * distribution.
  22. *
  23. * Neither the name of Texas Instruments Incorporated nor the names of
  24. * its contributors may be used to endorse or promote products derived
  25. * from this software without specific prior written permission.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  28. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  29. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  30. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  31. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  32. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  33. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  34. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  35. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  36. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  37. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. */
  39. #ifndef PCOUNT3D_DSS_H
  40. #define PCOUNT3D_DSS_H
  41. #include <ti/drivers/edma/edma.h>
  42. #include <cpy_tbl.h>
  43. #include <ti/sysbios/knl/Task.h>
  44. #include <ti/common/mmwave_error.h>
  45. #include <ti/drivers/soc/soc.h>
  46. #include <ti/drivers/soc/soc.h>
  47. #include <ti/drivers/mailbox/mailbox.h>
  48. #include <ti/drivers/hwa/hwa.h>
  49. #include <ti/drivers/osal/DebugP.h>
  50. #include <people_counting/68xx_3D_people_counting/src/common/pcount3D_output.h>
  51. #include <people_counting/68xx_3D_people_counting/src/common/pcount3D_config.h>
  52. #include <common/src/dpu/capon3d/radarProcess.h>
  53. #include <common/src/dpu/capon3d/modules/utilities/cycle_measure.h>
  54. /* This is used to resolve RL_MAX_SUBFRAMES, TODO: wired */
  55. #include <ti/control/mmwavelink/mmwavelink.h>
  56. #ifdef __cplusplus
  57. extern "C" {
  58. #endif
  59. typedef struct Pcount3DDemo_DataPathObj_t
  60. {
  61. /*! @brief dpm Handle */
  62. DPM_Handle radarProcDpmHandle;
  63. /*! @brief Handle of the EDMA driver. */
  64. EDMA_Handle edmaHandle;
  65. /*! @brief EDMA error Information when there are errors like missing events */
  66. EDMA_errorInfo_t EDMA_errorInfo;
  67. /*! @brief EDMA transfer controller error information. */
  68. EDMA_transferControllerErrorInfo_t EDMA_transferControllerErrorInfo;
  69. /*! @brief Processing Stats */
  70. Pcount3DDemo_output_message_stats subFrameStats[RL_MAX_SUBFRAMES];
  71. } Pcount3DDemo_DataPathObj;
  72. /**
  73. * @brief
  74. * Millimeter Wave Demo MCB
  75. *
  76. * @details
  77. * The structure is used to hold all the relevant information for the
  78. * Millimeter Wave demo
  79. */
  80. typedef struct Pcount3DDemo_DSS_MCB_t
  81. {
  82. /*! * @brief Handle to the SOC Module */
  83. SOC_Handle socHandle;
  84. /*! @brief DPM Handle */
  85. Task_Handle radarProcDpmTaskHandle;
  86. /*! @brief init Task Handle */
  87. Task_Handle initTaskHandle;
  88. /*! @brief Data Path object */
  89. Pcount3DDemo_DataPathObj dataPathObj;
  90. /*! @brief Counter which tracks the number of dpm stop events received
  91. The event is triggered by DPM_Report_DPC_STOPPED from DPM */
  92. uint32_t dpmStopEvents;
  93. /*! @brief Counter which tracks the number of dpm start events received
  94. The event is triggered by DPM_Report_DPC_STARTED from DPM */
  95. uint32_t dpmStartEvents;
  96. } Pcount3DDemo_DSS_MCB;
  97. /**************************************************************************
  98. *************************** Extern Definitions ***************************
  99. **************************************************************************/
  100. extern void Pcount3DDemo_dataPathInit(Pcount3DDemo_DataPathObj *obj);
  101. extern void Pcount3DDemo_dataPathOpen(Pcount3DDemo_DataPathObj *obj);
  102. extern void Pcount3DDemo_dataPathClose(Pcount3DDemo_DataPathObj *obj);
  103. /* Sensor Management Module Exported API */
  104. extern void _Pcount3DDemo_debugAssert(int32_t expression, const char *file, int32_t line);
  105. #define Pcount3DDemo_debugAssert(expression) { \
  106. DebugP_assert(expression); \
  107. }
  108. #ifdef __cplusplus
  109. }
  110. #endif
  111. #endif /* PCOUNT3D_DSS_H */