diag_runmode.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _DIAG_RUNMODE_H_
  13. #define _DIAG_RUNMODE_H_
  14. #include "drv_debug_port.h"
  15. #include "osi_compiler.h"
  16. OSI_EXTERN_C_BEGIN
  17. /**
  18. * @brief Diag run mode enumeration
  19. */
  20. typedef enum
  21. {
  22. DIAG_RM_NORMAL = 0, ///< normal mode
  23. DIAG_RM_CALIB = 0x01, ///< calibration mode
  24. DIAG_RM_BOOT = 0x02, ///< boot mode: reset and enter boot mode
  25. DIAG_RM_PIN_TEST = 0x03, ///< production test mode
  26. DIAG_RM_IQC = 0x04, ///< IQC fixture test mode
  27. DIAG_RM_CALIB_POST = 0x05, ///< calibration post mode
  28. DIAG_RM_CALIB_POST_NO_LCM_MODE = 0x06, ///< calibration post mode without lcm, app
  29. DIAG_RM_BBAT = 0x07,
  30. DIAG_RM_MAX_COUNT,
  31. } diagRunMode_t;
  32. /**
  33. * @breif check run mode
  34. *
  35. * @param port debug port
  36. * @return the run mode, refer to \p diagRunMode_t.
  37. */
  38. diagRunMode_t diagRunModeCheck(drvDebugPort_t *port);
  39. OSI_EXTERN_C_END
  40. #endif