ClearCore Library
Loading...
Searching...
No Matches
MotorDriver.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Teknic, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 * SOFTWARE.
21 */
22
27#ifndef __MOTORDRIVER_H__
28#define __MOTORDRIVER_H__
29
30#include <stdint.h>
31#include "Connector.h"
32#include "DigitalIn.h"
33#include "PeripheralRoute.h"
34#include "ShiftRegister.h"
35#include "StatusManager.h"
36#include "StepGenerator.h"
37#include "SysUtils.h"
38#include "SysManager.h"
39
40#define HLFB_CARRIER_LOSS_ERROR_LIMIT (0)
41#define HLFB_CARRIER_LOSS_STATE_CHANGE_MS_45_HZ (25)
42#define HLFB_CARRIER_LOSS_STATE_CHANGE_MS_482_HZ (4)
43
44namespace ClearCore {
45
49#define CPM_HLFB_CAP_HISTORY 2
50
54#define CPM_ENABLE_DELAY 1250
55
57#define DEFAULT_TRIGGER_PULSE_WIDTH_MS 25
58
60
79class MotorDriver : public DigitalIn, public StepGenerator {
80 friend class MotorManager;
81 friend class StatusManager;
82 friend class SysManager;
83
84public:
98 int16_t reg;
99
103 struct {
107 uint32_t enableInverted : 1;
111 uint32_t directionInverted : 1;
115 uint32_t hlfbInverted : 1;
117
122 reg = 0;
123 }
124
128 PolarityInversionsSD(int16_t val) {
129 reg = val;
130 }
131 };
132
136 static const int16_t HLFB_DUTY_UNKNOWN = -9999;
137
163
206
210 typedef enum {
211 HLFB_CARRIER_45_HZ,
212 HLFB_CARRIER_482_HZ
214
244
255 uint32_t reg;
256
260 struct {
265 uint32_t AtTargetPosition : 1;
269 uint32_t StepsActive : 1;
273 uint32_t AtTargetVelocity : 1;
279 uint32_t MoveDirection : 1;
284 uint32_t MotorInFault : 1;
289 uint32_t Enabled : 1;
293 uint32_t PositionalMove : 1;
297 uint32_t HlfbState : 2;
301 uint32_t AlertsPresent : 1;
309 uint32_t Triggering : 1;
313 uint32_t InPositiveLimit : 1;
317 uint32_t InNegativeLimit : 1;
321 uint32_t InEStopSensor : 1;
323
328 reg = 0;
329 }
330
334 StatusRegMotor(uint32_t val) {
335 reg = val;
336 }
337 };
338
349 uint32_t reg;
350
354 struct {
388 uint16_t MotorFaulted : 1;
390
395 reg = 0;
396 }
397
401 AlertRegMotor(uint32_t val) {
402 reg = val;
403 }
404 };
405
415 bool ValidateMove(bool negDirection);
416
420 virtual bool Move(int32_t dist,
421 MoveTarget moveTarget = MOVE_TARGET_REL_END_POSN) override;
422
426 virtual bool MoveVelocity(int32_t velocity) override;
427
442 void HlfbFilterLength(uint16_t samples) {
444 }
445
458 return Connector::CPM_TYPE;
459 }
460
472 bool IsWritable() override {
473 return true;
474 }
475
490
503 bool MotorInAState(bool value);
504
519
532 bool MotorInBState(bool value);
533
545 return m_enableRequestedState;
546 }
547
561 void EnableRequest(bool value);
562
576 bool MotorInADuty(uint8_t duty);
577
591 bool MotorInBDuty(uint8_t duty);
592
629 void EnableTriggerPulse(uint16_t pulseCount = 1,
630 uint32_t time_ms = DEFAULT_TRIGGER_PULSE_WIDTH_MS,
631 bool blockUntilDone = false);
632
653 volatile const bool &EnableTriggerPulseActive() {
654 return m_enableTriggerActive;
655 }
656
672 volatile const HlfbStates &HlfbState() {
673 return m_hlfbState;
674 }
675
694 volatile const float &HlfbPercent() {
695 return m_hlfbDuty;
696 }
697
709 void HlfbMode(HlfbModes newMode) {
710 if (m_hlfbMode == newMode) {
711 return;
712 }
713 m_hlfbMode = newMode;
714 m_hlfbCarrierLost = true;
715 m_hlfbDuty = HLFB_DUTY_UNKNOWN;
716 }
717
730 return m_hlfbMode;
731 }
732
745 return DigitalIn::InputRisen();
746 }
747
760 return DigitalIn::InputFallen();
761 }
762
774 switch (freq) {
775 case HLFB_CARRIER_45_HZ:
776 m_hlfbCarrierLossStateChange_ms =
777 HLFB_CARRIER_LOSS_STATE_CHANGE_MS_45_HZ;
778 break;
779 case HLFB_CARRIER_482_HZ:
780 m_hlfbCarrierLossStateChange_ms =
781 HLFB_CARRIER_LOSS_STATE_CHANGE_MS_482_HZ;
782 break;
783 default:
784 return false;
785 }
786 m_hlfbCarrierFrequency = freq;
787 return true;
788 }
789
809 return m_hlfbCarrierFrequency;
810 }
811
823 bool IsInHwFault() override {
824 return (volatile bool &)m_inFault;
825 }
835 volatile const StatusRegMotor &StatusReg() {
836 return m_statusRegMotor;
837 }
838
851
864
874 volatile const AlertRegMotor &AlertReg() {
875 return m_alertRegMotor;
876 }
877
887 void ClearAlerts(uint32_t mask = UINT32_MAX) {
888 atomic_and_fetch(&m_alertRegMotor.reg, ~mask);
889 }
890
905 bool PolarityInvertSDEnable(bool invert);
920 bool PolarityInvertSDDirection(bool invert);
935 bool PolarityInvertSDHlfb(bool invert);
936
973
1001 return m_brakeOutputPin;
1002 }
1003
1047
1070 return m_limitSwitchPos;
1071 }
1072
1116
1139 return m_limitSwitchNeg;
1140 }
1141
1153 virtual ConnectorModes Mode() override {
1154 return Connector::Mode();
1155 }
1156
1174
1191 return m_enableConnector;
1192 }
1193
1213
1232 return m_inputAConnector;
1233 }
1234
1254
1273 return m_inputBConnector;
1274 }
1275
1309
1328 return m_eStopConnector;
1329 }
1330
1338 return m_hlfbState == HLFB_ASSERTED ||
1339 m_hlfbState == HLFB_HAS_MEASUREMENT;
1340 }
1341
1347 void EnableActiveLevel(bool activeLevel) {
1348 m_polarityInversions.bit.enableInverted = activeLevel;
1349 }
1350
1358 return m_polarityInversions.bit.enableInverted;
1359 }
1360
1366 void HlfbActiveLevel(bool activeLevel) {
1367 m_polarityInversions.bit.hlfbInverted = !activeLevel;
1368 }
1369
1377 return !m_polarityInversions.bit.hlfbInverted;
1378 }
1379
1380#ifndef HIDE_FROM_DOXYGEN
1381
1382 virtual void OutputDirection() override {
1383 if (m_mode == Connector::CPM_MODE_STEP_AND_DIR &&
1384 m_polarityInversions.bit.directionInverted) {
1385 DATA_OUTPUT_STATE(m_aInfo->gpioPort, m_aDataMask, Direction());
1386 }
1387 else {
1388 DATA_OUTPUT_STATE(m_aInfo->gpioPort, m_aDataMask, !Direction());
1389 }
1390 }
1391
1392 void ClearFaults(uint32_t disableTime_ms, uint32_t waitForHlfbTime_ms = 0) {
1393 EnableTriggerPulse(1, disableTime_ms);
1394 m_clearFaultHlfbTimer = waitForHlfbTime_ms;
1395 m_clearFaultState = CLEAR_FAULT_PULSE_ENABLE;
1396 }
1397
1398 bool ClearFaultsActive() {
1399 return m_clearFaultState != CLEAR_FAULT_IDLE;
1400 }
1401
1410 static bool IsValidInputPin(ClearCorePins pin);
1411
1420 static bool IsValidOutputPin(ClearCorePins pin);
1421
1430 bool MotorInACount(uint16_t count);
1431
1440 bool MotorInBCount(uint16_t count);
1441
1446 MotorDriver() {};
1447#endif
1448protected:
1449 // Enable bit associated with this CPM
1450 ShiftRegister::Masks m_enableMask;
1451
1452 // Mapping to all the pin information
1453 const PeripheralRoute *m_aInfo;
1454 const PeripheralRoute *m_bInfo;
1455 const PeripheralRoute *m_hlfbInfo;
1456
1457 // Keep some commonly-used bits from the Info structures
1458 uint32_t m_aDataMask;
1459 volatile uint32_t *m_aTccBuffer;
1460 uint32_t m_bDataMask;
1461 volatile uint32_t *m_bTccBuffer;
1462 uint32_t m_aTccSyncMask;
1463 volatile uint32_t *m_aTccSyncReg;
1464 uint32_t m_bTccSyncMask;
1465 volatile uint32_t *m_bTccSyncReg;
1466
1467 // Enable, InA, InB connector pairing
1468 ClearCorePins m_enableConnector;
1469 ClearCorePins m_inputAConnector;
1470 ClearCorePins m_inputBConnector;
1471
1472 // - - - - - - - - - - - - - - - - - - - - - - - - - - -
1473 // HLFB State
1474 // - - - - - - - - - - - - - - - - - - - - - - - - - - -
1475 // Timer/Counter index associated with HLFB input
1476 uint8_t m_hlfbTcNum;
1477 // Assigned channel in EVSYS
1478 uint8_t m_hlfbEvt;
1479 // HLFB measurement mode
1480 HlfbModes m_hlfbMode;
1481 // HLFB width, period raw measurements
1482 uint16_t m_hlfbWidth[CPM_HLFB_CAP_HISTORY];
1483 uint16_t m_hlfbPeriod[CPM_HLFB_CAP_HISTORY];
1484 // HLFB measurement count, used to show lack of PWM
1485 uint16_t m_hlfbNoPwmSampleCount;
1486 HlfbCarrierFrequency m_hlfbCarrierFrequency;
1487 uint32_t m_hlfbCarrierLossStateChange_ms;
1488 // The last board time (in milliseconds) when PWM carrier was detected
1489 uint32_t m_hlfbLastCarrierDetectTime;
1490 // HLFB last duty cycle
1491 float m_hlfbDuty;
1492 // HLFB state return
1493 HlfbStates m_hlfbState;
1494 bool m_lastHlfbInputValue;
1495 bool m_hlfbPwmReadingPending;
1496 uint16_t m_hlfbStateChangeCounter;
1497
1498 // Inversion mask of actual enable, direction, and HLFB state
1499 PolarityInversionsSD m_polarityInversions;
1500
1501 bool m_enableRequestedState;
1502 bool m_enableTriggerActive;
1503 uint32_t m_enableTriggerPulseStartMs;
1504 uint32_t m_enableTriggerPulseCount;
1505 uint32_t m_enableTriggerPulseLenMs;
1506
1507 uint16_t m_aDutyCnt;
1508 uint16_t m_bDutyCnt;
1509
1510 bool m_inFault;
1511
1512 StatusRegMotor m_statusRegMotor;
1513 StatusRegMotor m_statusRegMotorRisen;
1514 StatusRegMotor m_statusRegMotorFallen;
1515 StatusRegMotor m_statusRegMotorLast;
1516
1517 AlertRegMotor m_alertRegMotor;
1518
1522 void Initialize(ClearCorePins clearCorePin) override;
1523
1529 void ToggleEnable();
1530
1531private:
1532
1533 enum ClearFaultState {
1534 CLEAR_FAULT_IDLE,
1535 CLEAR_FAULT_PULSE_ENABLE,
1536 CLEAR_FAULT_WAIT_FOR_HLFB
1537 };
1538
1539 bool m_initialized;
1540
1541 // Internal fields used for the IsReady field of the motor status reg
1542 bool m_isEnabling;
1543 bool m_isEnabled;
1544 bool m_hlfbCarrierLost;
1545 int32_t m_enableCounter;
1546
1547 // Brake Output Feature
1548 ClearCorePins m_brakeOutputPin;
1549
1550 // Limit Switch Feature
1551 ClearCorePins m_limitSwitchNeg;
1552 ClearCorePins m_limitSwitchPos;
1553
1554 // Hardware E-Stop Sensor Feature
1555 ClearCorePins m_eStopConnector;
1556 bool m_motionCancellingEStop;
1557
1558 bool m_shiftRegEnableReq;
1559 ClearFaultState m_clearFaultState;
1560 uint32_t m_clearFaultHlfbTimer;
1561
1565 MotorDriver(enum ShiftRegister::Masks enableMask,
1566 const PeripheralRoute *aInfo,
1567 const PeripheralRoute *bInfo,
1568 const PeripheralRoute *hlfbInfo,
1569 uint16_t hlfbTc,
1570 uint16_t hlfbEvt);
1571
1572 void UpdateADuty();
1573 void UpdateBDuty();
1574
1578 void RefreshSlow();
1579
1580 // Poll electrical connector state and update the internal state.
1581 void Refresh() override;
1582
1592 void FaultState(bool isFaulted);
1593
1605 bool Mode(Connector::ConnectorModes newMode) override;
1606
1622 bool SetConnector(ClearCorePins pin, ClearCorePins &memberPin,
1623 bool input = true);
1624
1629 bool CheckEStopSensor();
1630
1631}; // MotorDriver
1632
1633} // ClearCore namespace
1634
1635#endif // __MOTORDRIVER_H__
Base class for all connector classes.
ClearCore Digital Input Connector class.
#define CPM_HLFB_CAP_HISTORY
Definition MotorDriver.h:49
#define DEFAULT_TRIGGER_PULSE_WIDTH_MS
Definition MotorDriver.h:57
Defines the Peripheral Route structure, used in HardwareMapping.
LED shift register access class.
ClearCorePins
ClearCore PIN definitions.
Definition SysConnectors.h:54
ClearCore common utility functions.
#define DATA_OUTPUT_STATE(GPIO_PORT, DATA_MASK, STATE)
Definition SysUtils.h:86
virtual ConnectorModes Mode()
Get the connector's operational mode.
Definition Connector.h:309
ConnectorModes
All possible operational modes for a connector.
Definition Connector.h:74
@ CPM_MODE_STEP_AND_DIR
Definition Connector.h:126
ConnectorTypes
The different types of ClearCore connectors.
Definition Connector.h:172
@ CPM_TYPE
Definition Connector.h:264
ClearCore digital input connector class.
Definition DigitalIn.h:70
uint16_t FilterLength()
Get the connector's digital filter length in samples. The default is 3 samples.
Definition DigitalIn.h:146
bool InputRisen()
Clear on read accessor for this connector's rising input state.
bool InputFallen()
Clear on read accessor for this connector's falling input state.
ClearCore motor connector class.
Definition MotorDriver.h:79
HlfbModes
Setup the HLFB query to match the ClearPathâ„¢ Motor's HLFB signaling format.
Definition MotorDriver.h:168
@ HLFB_MODE_STATIC
Definition MotorDriver.h:178
@ HLFB_MODE_HAS_PWM
Definition MotorDriver.h:190
@ HLFB_MODE_HAS_BIPOLAR_PWM
Definition MotorDriver.h:204
volatile const float & HlfbPercent()
Returns the percent of Peak Torque/Max Speed based on the current HLFB PWM duty cycle.
Definition MotorDriver.h:694
bool MotorInADuty(uint8_t duty)
Function to set the duty cycle of a PWM signal being sent to the motor's Input A.
volatile const AlertRegMotor & AlertReg()
Accessor for the current Motor Alert Register.
Definition MotorDriver.h:874
Connector::ConnectorTypes Type() override
Get connector type.
Definition MotorDriver.h:457
ClearCorePins EnableConnector()
Definition MotorDriver.h:1190
void HlfbMode(HlfbModes newMode)
Sets operational mode of the HLFB to match up with the HLFB configuration of a ClearPathâ„¢ motor.
Definition MotorDriver.h:709
ClearCorePins InputAConnector()
Definition MotorDriver.h:1231
ClearCorePins InputBConnector()
Definition MotorDriver.h:1272
bool BrakeOutput(ClearCorePins pin)
Set the associated brake output connector.
StatusRegMotor StatusRegRisen()
Clear on read accessor for Motor Status Register rising edge detection.
bool LimitSwitchNeg(ClearCorePins pin)
Set the associated negative limit switch connector.
HlfbStates
Return state when HLFB state is requested.
Definition MotorDriver.h:144
@ HLFB_HAS_MEASUREMENT
Definition MotorDriver.h:157
@ HLFB_UNKNOWN
Definition MotorDriver.h:161
@ HLFB_DEASSERTED
Definition MotorDriver.h:148
@ HLFB_ASSERTED
Definition MotorDriver.h:152
bool EnableRequest()
Accessor for the enable request state of the motor.
Definition MotorDriver.h:544
void EnableTriggerPulse(uint16_t pulseCount=1, uint32_t time_ms=DEFAULT_TRIGGER_PULSE_WIDTH_MS, bool blockUntilDone=false)
Sends trigger pulse(s) to a connected ClearPathâ„¢ motor by de-asserting the enable signal for time_ms ...
ClearCorePins EStopConnector()
Definition MotorDriver.h:1327
bool EnableActiveLevel()
Definition MotorDriver.h:1357
void EnableRequest(bool value)
Function to request the motor to enable or disable.
void HlfbActiveLevel(bool activeLevel)
Definition MotorDriver.h:1366
static const int16_t HLFB_DUTY_UNKNOWN
Definition MotorDriver.h:136
bool PolarityInvertSDEnable(bool invert)
Function to invert the default polarity of the enable signal of this motor.
HlfbModes HlfbMode()
Accessor for current HLFB operational mode.
Definition MotorDriver.h:729
StatusRegMotor StatusRegFallen()
Clear on read accessor for Motor Status Register falling edge detection.
virtual ConnectorModes Mode() override
Get the connector's operational mode.
Definition MotorDriver.h:1153
void ClearAlerts(uint32_t mask=UINT32_MAX)
Clear the Motor Alert Register. Motion will be prevented if any Alert Register bits are set.
Definition MotorDriver.h:887
bool EnableConnector(ClearCorePins pin)
virtual bool MoveVelocity(int32_t velocity) override
Issues a velocity move at the specified velocity.
bool EStopConnector(ClearCorePins pin)
volatile const HlfbStates & HlfbState()
Return the latest HLFB state information.
Definition MotorDriver.h:672
ClearCorePins LimitSwitchPos()
Get the associated positive limit switch output connector.
Definition MotorDriver.h:1069
bool HlfbCarrier(HlfbCarrierFrequency freq)
Set the HLFB carrier frequency signal.
Definition MotorDriver.h:773
bool PolarityInvertSDDirection(bool invert)
Function to invert the default polarity of the direction signal of this motor.
bool IsWritable() override
Get R/W status of the connector.
Definition MotorDriver.h:472
ClearCorePins BrakeOutput()
Get the associated brake output connector.
Definition MotorDriver.h:1000
bool PolarityInvertSDHlfb(bool invert)
Function to invert the default polarity of the HLFB signal of this motor.
void HlfbFilterLength(uint16_t samples)
Sets the filter length in samples. The default is 3 samples.
Definition MotorDriver.h:442
bool ValidateMove(bool negDirection)
bool HlfbHasRisen()
Clear on read accessor for HLFB rising edge detection.
Definition MotorDriver.h:744
bool HlfbHasFallen()
Clear on read accessor for HLFB falling edge detection.
Definition MotorDriver.h:759
bool MotorInBState(bool value)
Function to set the value of the motor's Input B.
bool IsInHwFault() override
Check whether the connector is in a hardware fault state.
Definition MotorDriver.h:823
ClearCorePins LimitSwitchNeg()
Get the associated negative limit switch output connector.
Definition MotorDriver.h:1138
bool MotorInAState()
Accessor for the state of the motor's Input A.
void EnableActiveLevel(bool activeLevel)
Definition MotorDriver.h:1347
bool LimitSwitchPos(ClearCorePins pin)
Set the associated positive limit switch connector.
volatile const bool & EnableTriggerPulseActive()
Check to see if enable trigger pulses are actively being sent.
Definition MotorDriver.h:653
bool InputBConnector(ClearCorePins pin)
HlfbCarrierFrequency HlfbCarrier()
This motor's HLFB carrier frequency.
Definition MotorDriver.h:808
bool MotorInAState(bool value)
Function to set the state of the motor's Input A.
bool MotorInBDuty(uint8_t duty)
Function to set the duty cycle of a PWM signal being sent to the motor's Input B.
bool HlfbInputStatus()
Definition MotorDriver.h:1337
bool HlfbActiveLevel()
Definition MotorDriver.h:1376
bool InputAConnector(ClearCorePins pin)
MotorReadyStates
Motor readiness states.
Definition MotorDriver.h:222
@ MOTOR_ENABLING
Definition MotorDriver.h:230
@ MOTOR_DISABLED
Definition MotorDriver.h:226
@ MOTOR_FAULTED
Definition MotorDriver.h:234
@ MOTOR_READY
Definition MotorDriver.h:238
@ MOTOR_MOVING
Definition MotorDriver.h:242
bool MotorInBState()
Accessor for the state of the motor's Input B.
volatile const StatusRegMotor & StatusReg()
Accessor for the current Motor Status Register.
Definition MotorDriver.h:835
HlfbCarrierFrequency
High-Level Feedback (HLFB) carrier frequency: 45 Hz or 482 Hz.
Definition MotorDriver.h:210
virtual bool Move(int32_t dist, MoveTarget moveTarget=MOVE_TARGET_REL_END_POSN) override
Issues a positional move for the specified distance.
ClearCore motor-connector manager.
Definition MotorManager.h:46
ClearCore Status Register Manager class.
Definition StatusManager.h:37
ClearCore Step and Direction generator class.
Definition StepGenerator.h:58
ClearCore Board Supervisory System Manager.
Definition SysManager.h:58
Namespace to encompass the ClearCore board API.
Definition AdcManager.h:36
SysManager SysMgr
System manager.
Definition MotorDriver.h:59
Accumulating register of alerts that have occurred on this motor. Intended for use in Step and Direct...
Definition MotorDriver.h:345
uint16_t MotionCanceledNegativeLimit
Definition MotorDriver.h:371
uint16_t MotionCanceledPositiveLimit
Definition MotorDriver.h:365
AlertRegMotor(uint32_t val)
Definition MotorDriver.h:401
uint16_t MotionCanceledInAlert
Definition MotorDriver.h:359
uint16_t MotorFaulted
Definition MotorDriver.h:388
AlertRegMotor()
Definition MotorDriver.h:394
uint16_t MotionCanceledSensorEStop
Definition MotorDriver.h:377
uint16_t MotionCanceledMotorDisabled
Definition MotorDriver.h:383
struct ClearCore::MotorDriver::AlertRegMotor::@3 bit
uint32_t reg
Definition MotorDriver.h:349
A small register with bit and field views. This allows easy configuration for steppers that use an in...
Definition MotorDriver.h:94
PolarityInversionsSD()
Definition MotorDriver.h:121
struct ClearCore::MotorDriver::PolarityInversionsSD::@1 bit
PolarityInversionsSD(int16_t val)
Definition MotorDriver.h:128
int16_t reg
Definition MotorDriver.h:98
uint32_t enableInverted
Definition MotorDriver.h:107
uint32_t hlfbInverted
Definition MotorDriver.h:115
uint32_t directionInverted
Definition MotorDriver.h:111
Register access for information about the motor's operating status. Intended for use in Step and Dire...
Definition MotorDriver.h:251
uint32_t Triggering
Definition MotorDriver.h:309
uint32_t reg
Definition MotorDriver.h:255
uint32_t InEStopSensor
Definition MotorDriver.h:321
uint32_t AtTargetVelocity
Definition MotorDriver.h:273
MotorReadyStates ReadyState
Definition MotorDriver.h:305
uint32_t InNegativeLimit
Definition MotorDriver.h:317
uint32_t PositionalMove
Definition MotorDriver.h:293
uint32_t AtTargetPosition
Definition MotorDriver.h:265
StatusRegMotor()
Definition MotorDriver.h:327
StatusRegMotor(uint32_t val)
Definition MotorDriver.h:334
uint32_t InPositiveLimit
Definition MotorDriver.h:313
uint32_t Enabled
Definition MotorDriver.h:289
uint32_t HlfbState
Definition MotorDriver.h:297
struct ClearCore::MotorDriver::StatusRegMotor::@2 bit
uint32_t MotorInFault
Definition MotorDriver.h:284
uint32_t AlertsPresent
Definition MotorDriver.h:301
uint32_t MoveDirection
Definition MotorDriver.h:279
uint32_t StepsActive
Definition MotorDriver.h:269