Prusa-Firmware/Firmware/fsensor.h

66 lines
1.4 KiB
C
Raw Normal View History

2018-10-09 20:33:54 +00:00
//! @file
#ifndef FSENSOR_H
#define FSENSOR_H
2018-07-20 23:57:41 +00:00
#include <inttypes.h>
2018-10-09 20:33:54 +00:00
//! minimum meassured chunk length in steps
2018-07-20 23:57:41 +00:00
extern int16_t fsensor_chunk_len;
2018-10-09 20:33:54 +00:00
// enable/disable flag
2018-07-20 23:57:41 +00:00
extern bool fsensor_enabled;
2018-10-09 20:33:54 +00:00
// not responding flag
2018-07-20 23:57:41 +00:00
extern bool fsensor_not_responding;
//enable/disable quality meassurement
extern bool fsensor_oq_meassure_enabled;
2018-10-09 20:33:54 +00:00
//! @name save restore printing
//! @{
extern void fsensor_stop_and_save_print(void);
extern void fsensor_restore_print_and_continue(void);
2018-10-09 20:33:54 +00:00
//! @}
2018-10-09 20:33:54 +00:00
//! initialize
extern void fsensor_init(void);
2018-10-09 20:33:54 +00:00
//! @name enable/disable
//! @{
extern bool fsensor_enable(void);
extern void fsensor_disable(void);
2018-10-09 20:33:54 +00:00
//! @}
//autoload feature enabled
extern bool fsensor_autoload_enabled;
extern void fsensor_autoload_set(bool State);
extern void fsensor_update(void);
2019-01-24 15:14:02 +00:00
#ifdef PAT9125
2018-10-09 20:33:54 +00:00
//! setup pin-change interrupt
extern void fsensor_setup_interrupt(void);
2018-10-09 20:33:54 +00:00
//! @name autoload support
//! @{
2019-01-24 15:14:02 +00:00
extern void fsensor_autoload_check_start(void);
extern void fsensor_autoload_check_stop(void);
#endif //PAT9125
extern bool fsensor_check_autoload(void);
2018-10-09 20:33:54 +00:00
//! @}
2018-10-09 20:33:54 +00:00
//! @name optical quality measurement support
//! @{
extern void fsensor_oq_meassure_set(bool State);
extern void fsensor_oq_meassure_start(uint8_t skip);
extern void fsensor_oq_meassure_stop(void);
extern bool fsensor_oq_result(void);
2018-10-09 20:33:54 +00:00
//! @}
//! @name callbacks from stepper
//! @{
extern void fsensor_st_block_begin(bool rev);
extern void fsensor_st_block_chunk(int cnt);
2018-10-09 20:33:54 +00:00
//! @}
#endif //FSENSOR_H