/** 
 * \file tool.h
 * \brief tool configuration file
 * \details File contains configuration constants for Axis Z stepper motor controller
 *
 * \author Juraj Golej
 * \version 1.0
 */


#ifndef TOOL_CFG_H_
#define TOOL_CFG_H_

/* Axis X */
#define TOOL_CFG_PWM		PWM0			///< PWM periphery
#define TOOL_CFG_PWMCH		PWM_CHANNEL_1	///< PWM periphery channel
#define TOOL_CFG_PWMCLK		PWM_CLK_MCK32	///< PWM clock
#define TOOL_CFG_PWMPIN		PIN_DRV_STP2	///< PWM output pin

#define TOOL_CFG_DIRPIN		PIN_DRV_DIR2	///< Direction pin
#define TOOL_CFG_INVERSE	false			///< Inverse direction pin

#define TOOL_CFG_TIMER		TC2				///< Timer periphery for sample time
#define TOOL_CFG_TIMERCH	TIMER_CHANNEL_2	///< Timer channel
#define TOOL_CFG_TIMERCLK	TIMER_CLK_MCK32	///< Timer clock
#define TOOL_CFG_TIMERTICK	2000			///< Timer tick [us]

#define TOOL_CFG_MICROSTEP	4				///< Microstep resolution
#define TOOL_CFG_ONEREV		200				///< Number of steps per one motor rev
#define TOOL_CFG_PITCH		8				///< Pith screw
#define TOOL_CFG_ACCEL		1000			///< Acceleration [mm/s2]
#define TOOL_CFG_MAXPOS		50				///< Maximum move length ( absolute position) [mm]
#define TOOL_CFG_MAXSPEED	30				///< Maximum speed [mm/s]

#endif /* TOOL_CFG_H_ */