hal_step.h 755 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef __hal_step_h__
  2. #define __hal_step_h__
  3. #include <stdbool.h>
  4. #include <stdint.h>
  5. #include <string.h>
  6. #include "sdk_common.h"
  7. #include "SEGGER_RTT.h"
  8. #include "usr_config.h"
  9. #if 1
  10. void hal_step_init(void);
  11. uint8_t get_isLoader(void);
  12. #else
  13. typedef struct _step_count_t
  14. {
  15. uint16_t F_val_now;
  16. uint16_t F_val_now_B;
  17. float F_val_old;
  18. float F_filter_val;
  19. float F_max_val;
  20. float F_min_val;
  21. uint8_t F_state;
  22. uint8_t F_rise_cnt;
  23. uint32_t time_start;
  24. uint32_t timstamp_1;
  25. uint32_t timstamp_2;
  26. #if DEBUG_STEP
  27. uint16_t F_flag_step ;
  28. #endif
  29. uint8_t isLoader;
  30. }step_count_t;
  31. void hal_step_Init(void);
  32. uint32_t hal_get_step(void);
  33. void hal_rest_step(void);
  34. uint8_t get_isLoader(void);
  35. void hal_step_matlib_Test(uint8_t value);
  36. #endif
  37. #endif