Elide fsensor_st_block_begin, saving some cycles/bytes

This commit is contained in:
Yuri D'Elia 2019-06-03 11:48:36 +02:00
parent 5cd0177389
commit d2432056bd
2 changed files with 6 additions and 10 deletions

View File

@ -489,15 +489,6 @@ void fsensor_setup_interrupt(void)
#endif //PAT9125 #endif //PAT9125
void fsensor_st_block_begin(bool rev __attribute__((unused)))
{
// There's really nothing to do here: the stepper ISR likely has called us
// already at the end of the last block, making this integration redundant.
// LA1.5 might not always do that during a coasting move, so attempt to drain
// fsensor_st_cnt anyway at the beginning of the new block.
fsensor_st_block_chunk(0);
}
void fsensor_st_block_chunk(int cnt) void fsensor_st_block_chunk(int cnt)
{ {
if (!fsensor_enabled) return; if (!fsensor_enabled) return;

View File

@ -58,8 +58,13 @@ extern bool fsensor_oq_result(void);
//! @name callbacks from stepper //! @name callbacks from stepper
//! @{ //! @{
extern void fsensor_st_block_begin(bool rev);
extern void fsensor_st_block_chunk(int cnt); extern void fsensor_st_block_chunk(int cnt);
// There's really nothing to do in block_begin: the stepper ISR likely has
// called us already at the end of the last block, making this integration
// redundant. LA1.5 might not always do that during a coasting move, so attempt
// to drain fsensor_st_cnt anyway at the beginning of the new block.
#define fsensor_st_block_begin(rev) fsensor_st_block_chunk(0)
//! @} //! @}
#endif //FSENSOR_H #endif //FSENSOR_H