detect_step_by_mag.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef __DETECT_STEP_BY_MAG_H__
  2. #define __DETECT_STEP_BY_MAG_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. #include "nrf_gpio.h"
  10. //uint8_t detect_step_by_mag(int16_t *mag);
  11. uint8_t detect_step_by_mag(int16_t *mag, int16_t acc_z);
  12. uint8_t RealTimeStep(int16_t front[3], int16_t back[3], int16_t acc[3]);
  13. int16_t Get_ShoeTouchFlag(void);
  14. int16_t Get_Rcounter(void);
  15. int16_t Get_Tcounter(void);
  16. int16_t Get_FKEY(void);
  17. int16_t Get_BKEY(void);
  18. int32_t Get_RealFrontLiftPoint(void);
  19. int32_t Get_RealBackLiftPoint(void);
  20. static int FrontLiftPoint;
  21. static int FrontDropPoint;
  22. static int BackLiftPoint;
  23. static int BackDropPoint;
  24. static int calculate_flag;
  25. static int16_t Ucounter=0;
  26. static int16_t ShoeTouchFlag=1;
  27. static int16_t Rcounter=0;
  28. static int16_t FKEY=0;
  29. static int16_t BKEY=0;
  30. static uint8_t acc_index;
  31. static uint8_t mag_index_front;
  32. static uint8_t mag_index_back;
  33. static int FrontLiftDistance;
  34. static int BackLiftDistance;
  35. static int Lock=0;
  36. #endif