fsensor.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //! @file
  2. #ifndef FSENSOR_H
  3. #define FSENSOR_H
  4. #include <inttypes.h>
  5. //! minimum meassured chunk length in steps
  6. extern int16_t fsensor_chunk_len;
  7. // enable/disable flag
  8. extern bool fsensor_enabled;
  9. // not responding flag
  10. extern bool fsensor_not_responding;
  11. //enable/disable quality meassurement
  12. extern bool fsensor_oq_meassure_enabled;
  13. //! @name save restore printing
  14. //! @{
  15. extern void fsensor_stop_and_save_print(void);
  16. extern void fsensor_restore_print_and_continue(void);
  17. //! @}
  18. //! initialize
  19. extern void fsensor_init(void);
  20. //! @name enable/disable
  21. //! @{
  22. extern bool fsensor_enable(void);
  23. extern void fsensor_disable(void);
  24. //! @}
  25. //autoload feature enabled
  26. extern bool fsensor_autoload_enabled;
  27. extern void fsensor_autoload_set(bool State);
  28. extern void fsensor_update(void);
  29. #ifdef PAT9125
  30. //! setup pin-change interrupt
  31. extern void fsensor_setup_interrupt(void);
  32. //! @name autoload support
  33. //! @{
  34. extern void fsensor_autoload_check_start(void);
  35. extern void fsensor_autoload_check_stop(void);
  36. #endif //PAT9125
  37. extern bool fsensor_check_autoload(void);
  38. //! @}
  39. //! @name optical quality measurement support
  40. //! @{
  41. extern void fsensor_oq_meassure_set(bool State);
  42. extern void fsensor_oq_meassure_start(uint8_t skip);
  43. extern void fsensor_oq_meassure_stop(void);
  44. extern bool fsensor_oq_result(void);
  45. //! @}
  46. #include "planner.h"
  47. //! @name callbacks from stepper
  48. //! @{
  49. extern void fsensor_st_block_begin(block_t* bl);
  50. extern void fsensor_st_block_chunk(block_t* bl, int cnt);
  51. //! @}
  52. #endif //FSENSOR_H