This repository has been archived on 2026-06-17. You can view files and clone it, but cannot push or open issues or pull requests.
FireWatchTower_2axis/firmware/lib/tmc/ramp/LinearRamp.h

35 lines
1.0 KiB
C
Executable File

/*******************************************************************************
* Copyright © 2018 TRINAMIC Motion Control GmbH & Co. KG
* (now owned by Analog Devices Inc.),
*
* Copyright © 2024 Analog Devices Inc. All Rights Reserved.
* This software is proprietary to Analog Devices, Inc. and its licensors.
*******************************************************************************/
#ifndef TMC_LINEAR_RAMP_H_
#define TMC_LINEAR_RAMP_H_
#include "tmc/helpers/API_Header.h"
#include "tmc/helpers/Functions.h"
typedef struct
{
uint32_t maxVelocity;
int32_t targetPosition;
int32_t rampPosition;
int32_t targetVelocity;
int32_t rampVelocity;
int32_t acceleration;
uint16_t encoderSteps;
int32_t lastdVRest;
int32_t lastdXRest;
uint8_t rampEnabled;
} TMC_LinearRamp;
void tmc_linearRamp_init(TMC_LinearRamp *linearRamp);
void tmc_linearRamp_computeRampVelocity(TMC_LinearRamp *linearRamp);
void tmc_linearRamp_computeRampPosition(TMC_LinearRamp *linearRamp);
#endif /* TMC_LINEAR_RAMP_H_ */