Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CanMotion.h « CAN « src - github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ff775bde60c549c528b79c21406daeb49c6c6237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * CanMotion.h
 *
 *  Created on: 11 Aug 2019
 *      Author: David
 */

#ifndef SRC_CAN_CANMOTION_H_
#define SRC_CAN_CANMOTION_H_

#include "RepRapFirmware.h"

#if SUPPORT_CAN_EXPANSION

#include <Movement/DDA.h>

namespace CanMotion
{
	void Init();
	void StartMovement(const DDA& dda);
	void AddMovement(const DDA& dda, const PrepParams& params, DriverId canDriver, int32_t steps, bool usePressureAdvance);
	void FinishMovement(uint32_t moveStartTime);
	bool CanPrepareMove();
	CanMessageBuffer *GetUrgentMessage();

	// The next 4 functions may be called from the step ISR, so they can't send CAN messages directly
	void InsertHiccup(uint32_t numClocks);
	void StopDriver(DriverId driver);
	void StopAxis(size_t axis);
	void StopAll();
}

#endif

#endif /* SRC_CAN_CANMOTION_H_ */