blob: e9b5929f69a45215482a14552872aba5111dc310 (
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(bool isBeingPrepared, DriverId driver);
void StopAxis(bool isBeingPrepared, size_t axis);
void StopAll(bool isBeingPrepared);
}
#endif
#endif /* SRC_CAN_CANMOTION_H_ */
|