/** 
 * \file path_cfg.h
 * \brief path configuration file
 * \details File contains configuration constants for PATH regulators
 *
 * \author Juraj Golej
 * \version 1.0
 */


#ifndef PATH_CFG_H_
#define PATH_CFG_H_

/* Axis X */
#define PATH_CFG_AXISX_PWM			PWM0			///< PWM periphery
#define PATH_CFG_AXISX_PWMCH		PWM_CHANNEL_2	///< PWM periphery channel
#define PATH_CFG_AXISX_PWMCLK		PWM_CLK_MCK8	///< PWM clock
#define PATH_CFG_AXISX_PWMPIN		PIN_DRV_STP4	///< PWM output pin

#define PATH_CFG_AXISX_DIRPIN		PIN_DRV_DIR4	///< Direction pin
#define PATH_CFG_AXISX_INVERSE		false			///< Inverse direction pin

#define PATH_CFG_AXISX_TIMER		TC3				///< Timer periphery for sample time
#define PATH_CFG_AXISX_TIMERCH		TIMER_CHANNEL_1	///< Timer channel
#define PATH_CFG_AXISX_TIMERCLK		TIMER_CLK_MCK32	///< Timer clock
#define PATH_CFG_AXISX_TIMERTICK	2000			///< Timer tick [us]

#define PATH_CFG_AXISX_MICROSTEP	4				///< Microstep resolution
#define PATH_CFG_AXISX_ONEREV		200				///< Number of steps per one motor rev
#define PATH_CFG_AXISX_PITCH		60				///< Pith
#define PATH_CFG_AXISX_ACCEL		400				///< Acceleration [mm/s2]
#define PATH_CFG_AXISX_MAXPOS		850				///< Maximum move length ( absolute position) [mm]
#define PATH_CFG_AXISX_MAXSPEED		400				///< Maximum speed [mm/s]

/* Axis Y */
#define PATH_CFG_AXISY_PWM			PWM0			///< PWM periphery
#define PATH_CFG_AXISY_PWMCH		PWM_CHANNEL_0	///< PWM periphery channel
#define PATH_CFG_AXISY_PWMCLK		PWM_CLK_MCK8	///< PWM clock
#define PATH_CFG_AXISY_PWMPIN		PIN_DRV_STP3	///< PWM output pin

#define PATH_CFG_AXISY_DIRPIN		PIN_DRV_DIR3	///< Direction pin
#define PATH_CFG_AXISY_INVERSE		true			///< Inverse direction pin

#define PATH_CFG_AXISY_TIMER		TC3				///< Timer periphery for sample time
#define PATH_CFG_AXISY_TIMERCH		TIMER_CHANNEL_0	///< Timer channel
#define PATH_CFG_AXISY_TIMERCLK		TIMER_CLK_MCK32	///< Timer clock
#define PATH_CFG_AXISY_TIMERTICK	2000			///< Timer tick [us]

#define PATH_CFG_AXISY_MICROSTEP	4				///< Microstep resolution
#define PATH_CFG_AXISY_ONEREV		200				///< Number of steps per one motor rev
#define PATH_CFG_AXISY_PITCH		60				///< Pith
#define PATH_CFG_AXISY_ACCEL		400				///< Acceleration [mm/s2]
#define PATH_CFG_AXISY_MAXPOS		850				///< Maximum move length ( absolute position) [mm]
#define PATH_CFG_AXISY_MAXSPEED		400				///< Maximum speed [mm/s]

#endif /* PATH_CFG_H_ */