ql_boot_led.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*================================================================
  2. Copyright (c) 2021, Quectel Wireless Solutions Co., Ltd. All rights reserved.
  3. Quectel Wireless Solutions Proprietary and Confidential.
  4. =================================================================*/
  5. /*=================================================================
  6. EDIT HISTORY FOR MODULE
  7. This section contains comments describing changes made to the module.
  8. Notice that changes are listed in reverse chronological order.
  9. WHEN WHO WHAT, WHERE, WHY
  10. ------------ ------- -------------------------------------------------------------------------------
  11. =================================================================*/
  12. #ifndef QL_BOOT_LED_H
  13. #define QL_BOOT_LED_H
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. /*===========================================================================
  18. * Macro Definition
  19. ===========================================================================*/
  20. #define QL_BOOT_LED_ERRCODE_BASE (0x820F<<16)
  21. /*===========================================================================
  22. * Enum
  23. ===========================================================================*/
  24. /**
  25. * boot_led errcode
  26. */
  27. typedef enum
  28. {
  29. QL_BOOT_LED_SUCCESS = 0,
  30. QL_BOOT_LED_EXECUTE_ERR = 1|QL_BOOT_LED_ERRCODE_BASE,
  31. QL_BOOT_LED_INVALID_PARAM_ERR,
  32. }ql_errcode_boot_led;
  33. /**
  34. * boot_led LPG Period and high-level time
  35. */
  36. typedef enum
  37. {
  38. BOOT_LPG_PER_125MS,
  39. BOOT_LPG_PER_250MS,
  40. BOOT_LPG_PER_500MS,
  41. BOOT_LPG_PER_1000MS,
  42. BOOT_LPG_PER_1500MS,
  43. BOOT_LPG_PER_2000MS,
  44. BOOT_LPG_PER_2500MS,
  45. BOOT_LPG_PER_3000MS
  46. }ql_boot_LpgPer;
  47. typedef enum
  48. {
  49. BOOT_LPG_ONTIME_UNDEFINE,
  50. BOOT_LPG_ONTIME_15_6MS,
  51. BOOT_LPG_ONTIME_31_2MS,
  52. BOOT_LPG_ONTIME_46_8MS,
  53. BOOT_LPG_ONTIME_62MS,
  54. BOOT_LPG_ONTIME_78MS,
  55. BOOT_LPG_ONTIME_94MS,
  56. BOOT_LPG_ONTIME_110MS,
  57. BOOT_LPG_ONTIME_125MS,
  58. BOOT_LPG_ONTIME_140MS,
  59. BOOT_LPG_ONTIME_156MS,
  60. BOOT_LPG_ONTIME_172MS,
  61. BOOT_LPG_ONTIME_188MS,
  62. BOOT_LPG_ONTIME_200MS,
  63. BOOT_LPG_ONTIME_218MS,
  64. BOOT_LPG_ONTIME_234MS
  65. }ql_boot_LpgOntime;
  66. /*===========================================================================
  67. * Functions declaration
  68. ===========================================================================*/
  69. /**
  70. * @brief boot_led function enable
  71. * @param lpg_period : LPG period
  72. * @param highlvl_time : LPG high-level time
  73. * @return
  74. * QL_BOOT_LED_INVALID_PARAM_ERR
  75. * QL_BOOT_LED_SUCCESS
  76. */
  77. ql_errcode_boot_led ql_boot_led_enable(ql_boot_LpgPer lpg_period, ql_boot_LpgOntime highlvl_time);
  78. /**
  79. * @brief boot_led function disable
  80. * @param none
  81. * @return
  82. * QL_BOOT_LED_SUCCESS
  83. */
  84. ql_errcode_boot_led ql_boot_led_disable(void);
  85. #ifdef __cplusplus
  86. } /*"C" */
  87. #endif
  88. #endif /* QL_BOOT_LED_H */