fsensor.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. //! setup pin-change interrupt
  30. extern void fsensor_setup_interrupt(void);
  31. //! @name autoload support
  32. //! @{
  33. extern void fsensor_autoload_check_start(void);
  34. extern void fsensor_autoload_check_stop(void);
  35. extern bool fsensor_check_autoload(void);
  36. //! @}
  37. //! @name optical quality measurement support
  38. //! @{
  39. extern void fsensor_oq_meassure_set(bool State);
  40. extern void fsensor_oq_meassure_start(uint8_t skip);
  41. extern void fsensor_oq_meassure_stop(void);
  42. extern bool fsensor_oq_result(void);
  43. //! @}
  44. #include "planner.h"
  45. //! @name callbacks from stepper
  46. //! @{
  47. extern void fsensor_st_block_begin(block_t* bl);
  48. extern void fsensor_st_block_chunk(block_t* bl, int cnt);
  49. //! @}
  50. #endif //FSENSOR_H