hc_fun.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-12-21 19813 the first version
  9. */
  10. #ifndef APPLICATIONS_HC_FUN_H_
  11. #define APPLICATIONS_HC_FUN_H_
  12. /*********************¡ý define ¡ý************************/
  13. /*********************¡ü define ¡ü************************/
  14. /**
  15. *
  16. *
  17. *
  18. *
  19. * */
  20. /*********************¡ý include ¡ý************************/
  21. #include <rtthread.h>
  22. #include <rtdevice.h>
  23. #include <../add_pkg/libmodbus/inc/modbus.h>
  24. #include "stdio.h"
  25. #include "string.h"
  26. #include "math.h"
  27. #include <easyflash.h>
  28. //#include "sys_config.h"
  29. #include <board.h>
  30. #include "bsp_user_lib.h"
  31. #include "signal_led.h"
  32. #include "stm32f4xx_hal.h"
  33. /*********************¡ü include ¡ü************************/
  34. /**
  35. *
  36. *
  37. *
  38. *
  39. * */
  40. /*********************¡ý extern ¡ý************************/
  41. /*********************¡ü extern ¡ü************************/
  42. /**
  43. *
  44. *
  45. *
  46. *
  47. * */
  48. /*********************¡ý global variables ¡ý************************/
  49. /*********************¡ü global variables ¡ü************************/
  50. /**
  51. *
  52. *
  53. *
  54. *
  55. * */
  56. /*********************¡ý declaration ¡ý************************/
  57. typedef enum
  58. {
  59. HC_OK = 0,
  60. HC_ERROR ,
  61. HC_ParaErr ,
  62. HC_1 ,
  63. HC_0
  64. }HC_RES;
  65. HC_RES HC_CheckReturn(uint8_t check_len);
  66. HC_RES HC_CalibrationTime(void);
  67. HC_RES HC_SetRunMode(void);
  68. HC_RES HC_SetInterval(void);
  69. HC_RES HC_SetWaitTime(void);
  70. HC_RES HC_SetOnecWaitTime(uint8_t duration);
  71. HC_RES HC_Set_Reserve_PWR(uint8_t Reserve_PWR);
  72. HC_RES HC_GetReturn(uint8_t check_len);
  73. HC_RES HC_Get_PWSta(void);
  74. /*********************¡ü declaration ¡ü************************/
  75. /**
  76. *
  77. *
  78. *
  79. *
  80. * */
  81. #endif /* APPLICATIONS_HC_FUN_H_ */