ClearCore Library
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 
44 namespace 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 
79 class MotorDriver : public DigitalIn, public StepGenerator {
80  friend class MotorManager;
81  friend class StatusManager;
82  friend class SysManager;
83 
84 public:
98  int16_t reg;
99 
103  struct {
107  uint32_t enableInverted : 1;
111  uint32_t directionInverted : 1;
115  uint32_t hlfbInverted : 1;
116  } bit;
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 
144  typedef enum {
162  } HlfbStates;
163 
168  typedef enum {
205  } HlfbModes;
206 
210  typedef enum {
211  HLFB_CARRIER_45_HZ,
212  HLFB_CARRIER_482_HZ
214 
222  typedef enum {
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;
305  MotorReadyStates ReadyState : 3;
309  uint32_t Triggering : 1;
313  uint32_t InPositiveLimit : 1;
317  uint32_t InNegativeLimit : 1;
321  uint32_t InEStopSensor : 1;
322  } bit;
323 
328  reg = 0;
329  }
330 
334  StatusRegMotor(uint32_t val) {
335  reg = val;
336  }
337  };
338 
349  uint32_t reg;
350 
354  struct {
359  uint16_t MotionCanceledInAlert : 1;
365  uint16_t MotionCanceledPositiveLimit : 1;
371  uint16_t MotionCanceledNegativeLimit : 1;
377  uint16_t MotionCanceledSensorEStop : 1;
383  uint16_t MotionCanceledMotorDisabled : 1;
388  uint16_t MotorFaulted : 1;
389  } bit;
390 
395  reg = 0;
396  }
397 
401  AlertRegMotor(uint32_t val) {
402  reg = val;
403  }
404  };
405 
419  bool ValidateMove(bool negDirection);
420 
424  virtual bool Move(int32_t dist,
425  MoveTarget moveTarget = MOVE_TARGET_REL_END_POSN) override;
426 
430  virtual bool MoveVelocity(int32_t velocity) override;
431 
446  void HlfbFilterLength(uint16_t samples) {
447  DigitalIn::FilterLength(samples);
448  }
449 
462  return Connector::CPM_TYPE;
463  }
464 
476  bool IsWritable() override {
477  return true;
478  }
479 
493  bool MotorInAState();
494 
507  bool MotorInAState(bool value);
508 
522  bool MotorInBState();
523 
536  bool MotorInBState(bool value);
537 
548  bool EnableRequest() {
549  return m_enableRequestedState;
550  }
551 
565  void EnableRequest(bool value);
566 
580  bool MotorInADuty(uint8_t duty);
581 
595  bool MotorInBDuty(uint8_t duty);
596 
633  void EnableTriggerPulse(uint16_t pulseCount = 1,
634  uint32_t time_ms = DEFAULT_TRIGGER_PULSE_WIDTH_MS,
635  bool blockUntilDone = false);
636 
657  volatile const bool &EnableTriggerPulseActive() {
658  return m_enableTriggerActive;
659  }
660 
676  volatile const HlfbStates &HlfbState() {
677  return m_hlfbState;
678  }
679 
698  volatile const float &HlfbPercent() {
699  return m_hlfbDuty;
700  }
701 
713  void HlfbMode(HlfbModes newMode) {
714  if (m_hlfbMode == newMode) {
715  return;
716  }
717  m_hlfbMode = newMode;
718  m_hlfbCarrierLost = true;
719  m_hlfbDuty = HLFB_DUTY_UNKNOWN;
720  }
721 
733  HlfbModes HlfbMode() {
734  return m_hlfbMode;
735  }
736 
748  bool HlfbHasRisen() {
749  return DigitalIn::InputRisen();
750  }
751 
763  bool HlfbHasFallen() {
764  return DigitalIn::InputFallen();
765  }
766 
781  bool HlfbCarrier(HlfbCarrierFrequency freq) {
782  switch (freq) {
783  case HLFB_CARRIER_45_HZ:
784  m_hlfbCarrierLossStateChange_ms =
785  HLFB_CARRIER_LOSS_STATE_CHANGE_MS_45_HZ;
786  break;
787  case HLFB_CARRIER_482_HZ:
788  m_hlfbCarrierLossStateChange_ms =
789  HLFB_CARRIER_LOSS_STATE_CHANGE_MS_482_HZ;
790  break;
791  default:
792  return false;
793  }
794  m_hlfbCarrierFrequency = freq;
795  return true;
796  }
797 
820  HlfbCarrierFrequency HlfbCarrier() {
821  return m_hlfbCarrierFrequency;
822  }
823 
835  bool IsInHwFault() override {
836  return (volatile bool &)m_inFault;
837  }
847  volatile const StatusRegMotor &StatusReg() {
848  return m_statusRegMotor;
849  }
850 
863 
876 
886  volatile const AlertRegMotor &AlertReg() {
887  return m_alertRegMotor;
888  }
889 
899  void ClearAlerts(uint32_t mask = UINT32_MAX) {
900  atomic_and_fetch(&m_alertRegMotor.reg, ~mask);
901  }
902 
917  bool PolarityInvertSDEnable(bool invert);
932  bool PolarityInvertSDDirection(bool invert);
947  bool PolarityInvertSDHlfb(bool invert);
948 
983  bool BrakeOutput(ClearCorePins pin);
984 
1016  return m_brakeOutputPin;
1017  }
1018 
1053  bool LimitSwitchPos(ClearCorePins pin);
1054 
1085  return m_limitSwitchPos;
1086  }
1087 
1122  bool LimitSwitchNeg(ClearCorePins pin);
1123 
1154  return m_limitSwitchNeg;
1155  }
1156 
1168  virtual ConnectorModes Mode() override {
1169  return Connector::Mode();
1170  }
1171 
1192  bool EnableConnector(ClearCorePins pin);
1193 
1214  return m_enableConnector;
1215  }
1216 
1239  bool InputAConnector(ClearCorePins pin);
1240 
1263  return m_inputAConnector;
1264  }
1265 
1288  bool InputBConnector(ClearCorePins pin);
1289 
1312  return m_inputBConnector;
1313  }
1314 
1336  bool EStopConnector(ClearCorePins pin);
1337 
1360  return m_eStopConnector;
1361  }
1362 
1370  return m_hlfbState == HLFB_ASSERTED ||
1371  m_hlfbState == HLFB_HAS_MEASUREMENT;
1372  }
1373 
1379  void EnableActiveLevel(bool activeLevel) {
1380  m_polarityInversions.bit.enableInverted = activeLevel;
1381  }
1382 
1390  return m_polarityInversions.bit.enableInverted;
1391  }
1392 
1398  void HlfbActiveLevel(bool activeLevel) {
1399  m_polarityInversions.bit.hlfbInverted = !activeLevel;
1400  }
1401 
1409  return !m_polarityInversions.bit.hlfbInverted;
1410  }
1411 
1412 #ifndef HIDE_FROM_DOXYGEN
1413 
1414  virtual void OutputDirection() override {
1415  if (m_mode == Connector::CPM_MODE_STEP_AND_DIR &&
1416  m_polarityInversions.bit.directionInverted) {
1417  DATA_OUTPUT_STATE(m_aInfo->gpioPort, m_aDataMask, Direction());
1418  }
1419  else {
1420  DATA_OUTPUT_STATE(m_aInfo->gpioPort, m_aDataMask, !Direction());
1421  }
1422  }
1423 
1424  void ClearFaults(uint32_t disableTime_ms, uint32_t waitForHlfbTime_ms = 0) {
1425  EnableTriggerPulse(1, disableTime_ms);
1426  m_clearFaultHlfbTimer = waitForHlfbTime_ms;
1427  m_clearFaultState = CLEAR_FAULT_PULSE_ENABLE;
1428  }
1429 
1430  bool ClearFaultsActive() {
1431  return m_clearFaultState != CLEAR_FAULT_IDLE;
1432  }
1433 
1442  static bool IsValidInputPin(ClearCorePins pin);
1443 
1452  static bool IsValidOutputPin(ClearCorePins pin);
1453 
1462  bool MotorInACount(uint16_t count);
1463 
1472  bool MotorInBCount(uint16_t count);
1473 
1478  MotorDriver() {};
1479 #endif
1480 protected:
1481  // Enable bit associated with this CPM
1482  ShiftRegister::Masks m_enableMask;
1483 
1484  // Mapping to all the pin information
1485  const PeripheralRoute *m_aInfo;
1486  const PeripheralRoute *m_bInfo;
1487  const PeripheralRoute *m_hlfbInfo;
1488 
1489  // Keep some commonly-used bits from the Info structures
1490  uint32_t m_aDataMask;
1491  volatile uint32_t *m_aTccBuffer;
1492  uint32_t m_bDataMask;
1493  volatile uint32_t *m_bTccBuffer;
1494  uint32_t m_aTccSyncMask;
1495  volatile uint32_t *m_aTccSyncReg;
1496  uint32_t m_bTccSyncMask;
1497  volatile uint32_t *m_bTccSyncReg;
1498 
1499  // Enable, InA, InB connector pairing
1500  ClearCorePins m_enableConnector;
1501  ClearCorePins m_inputAConnector;
1502  ClearCorePins m_inputBConnector;
1503 
1504  // - - - - - - - - - - - - - - - - - - - - - - - - - - -
1505  // HLFB State
1506  // - - - - - - - - - - - - - - - - - - - - - - - - - - -
1507  // Timer/Counter index associated with HLFB input
1508  uint8_t m_hlfbTcNum;
1509  // Assigned channel in EVSYS
1510  uint8_t m_hlfbEvt;
1511  // HLFB measurement mode
1512  HlfbModes m_hlfbMode;
1513  // HLFB width, period raw measurements
1514  uint16_t m_hlfbWidth[CPM_HLFB_CAP_HISTORY];
1515  uint16_t m_hlfbPeriod[CPM_HLFB_CAP_HISTORY];
1516  // HLFB measurement count, used to show lack of PWM
1517  uint16_t m_hlfbNoPwmSampleCount;
1518  HlfbCarrierFrequency m_hlfbCarrierFrequency;
1519  uint32_t m_hlfbCarrierLossStateChange_ms;
1520  // The last board time (in milliseconds) when PWM carrier was detected
1521  uint32_t m_hlfbLastCarrierDetectTime;
1522  // HLFB last duty cycle
1523  float m_hlfbDuty;
1524  // HLFB state return
1525  HlfbStates m_hlfbState;
1526  bool m_lastHlfbInputValue;
1527  bool m_hlfbPwmReadingPending;
1528  uint16_t m_hlfbStateChangeCounter;
1529 
1530  // Inversion mask of actual enable, direction, and HLFB state
1531  PolarityInversionsSD m_polarityInversions;
1532 
1533  bool m_enableRequestedState;
1534  bool m_enableTriggerActive;
1535  uint32_t m_enableTriggerPulseStartMs;
1536  uint32_t m_enableTriggerPulseCount;
1537  uint32_t m_enableTriggerPulseLenMs;
1538 
1539  uint16_t m_aDutyCnt;
1540  uint16_t m_bDutyCnt;
1541 
1542  bool m_inFault;
1543 
1544  StatusRegMotor m_statusRegMotor;
1545  StatusRegMotor m_statusRegMotorRisen;
1546  StatusRegMotor m_statusRegMotorFallen;
1547  StatusRegMotor m_statusRegMotorLast;
1548 
1549  AlertRegMotor m_alertRegMotor;
1550 
1554  void Initialize(ClearCorePins clearCorePin) override;
1555 
1561  void ToggleEnable();
1562 
1563 private:
1564 
1565  enum ClearFaultState {
1566  CLEAR_FAULT_IDLE,
1567  CLEAR_FAULT_PULSE_ENABLE,
1568  CLEAR_FAULT_WAIT_FOR_HLFB
1569  };
1570 
1571  bool m_initialized;
1572 
1573  // Internal fields used for the IsReady field of the motor status reg
1574  bool m_isEnabling;
1575  bool m_isEnabled;
1576  bool m_hlfbCarrierLost;
1577  int32_t m_enableCounter;
1578 
1579  // Brake Output Feature
1580  ClearCorePins m_brakeOutputPin;
1581 
1582  // Limit Switch Feature
1583  ClearCorePins m_limitSwitchNeg;
1584  ClearCorePins m_limitSwitchPos;
1585 
1586  // Hardware E-Stop Sensor Feature
1587  ClearCorePins m_eStopConnector;
1588  bool m_motionCancellingEStop;
1589 
1590  bool m_shiftRegEnableReq;
1591  ClearFaultState m_clearFaultState;
1592  uint32_t m_clearFaultHlfbTimer;
1593 
1597  MotorDriver(enum ShiftRegister::Masks enableMask,
1598  const PeripheralRoute *aInfo,
1599  const PeripheralRoute *bInfo,
1600  const PeripheralRoute *hlfbInfo,
1601  uint16_t hlfbTc,
1602  uint16_t hlfbEvt);
1603 
1604  void UpdateADuty();
1605  void UpdateBDuty();
1606 
1610  void RefreshSlow();
1611 
1612  // Poll electrical connector state and update the internal state.
1613  void Refresh() override;
1614 
1624  void FaultState(bool isFaulted);
1625 
1637  bool Mode(Connector::ConnectorModes newMode) override;
1638 
1654  bool SetConnector(ClearCorePins pin, ClearCorePins &memberPin,
1655  bool input = true);
1656 
1661  bool CheckEStopSensor();
1662 
1663 }; // MotorDriver
1664 
1665 } // ClearCore namespace
1666 
1667 #endif // __MOTORDRIVER_H__
Definition: MotorDriver.h:238
volatile const float & HlfbPercent()
Returns the percent of Peak Torque/Max Speed based on the current HLFB PWM duty cycle.
Definition: MotorDriver.h:698
uint32_t enableInverted
Definition: MotorDriver.h:107
ClearCorePins EnableConnector()
Definition: MotorDriver.h:1213
void HlfbActiveLevel(bool activeLevel)
Definition: MotorDriver.h:1398
Definition: MotorDriver.h:148
PolarityInversionsSD(int16_t val)
Definition: MotorDriver.h:128
Definition: MotorDriver.h:234
static const int16_t HLFB_DUTY_UNKNOWN
Definition: MotorDriver.h:136
Defines the Peripheral Route structure, used in HardwareMapping.
bool HlfbHasFallen()
Clear on read accessor for HLFB falling edge detection.
Definition: MotorDriver.h:763
bool MotorInBState()
Accessor for the state of the motor&#39;s Input B.
volatile const StatusRegMotor & StatusReg()
Accessor for the current Motor Status Register.
Definition: MotorDriver.h:847
MotorReadyStates
Motor readiness states.
Definition: MotorDriver.h:222
ClearCore digital input connector class.
Definition: DigitalIn.h:70
StatusRegMotor(uint32_t val)
Definition: MotorDriver.h:334
void HlfbMode(HlfbModes newMode)
Sets operational mode of the HLFB to match up with the HLFB configuration of a ClearPathâ„¢ motor...
Definition: MotorDriver.h:713
#define DATA_OUTPUT_STATE(GPIO_PORT, DATA_MASK, STATE)
Definition: SysUtils.h:86
bool HlfbHasRisen()
Clear on read accessor for HLFB rising edge detection.
Definition: MotorDriver.h:748
uint32_t hlfbInverted
Definition: MotorDriver.h:115
bool MotorInADuty(uint8_t duty)
Function to set the duty cycle of a PWM signal being sent to the motor&#39;s Input A. ...
virtual ConnectorModes Mode() override
Get the connector&#39;s operational mode.
Definition: MotorDriver.h:1168
AlertRegMotor()
Definition: MotorDriver.h:394
bool EnableActiveLevel()
Definition: MotorDriver.h:1389
uint16_t FilterLength()
Get the connector&#39;s digital filter length in samples. The default is 3 samples.
Definition: DigitalIn.h:146
bool IsInHwFault() override
Check whether the connector is in a hardware fault state.
Definition: MotorDriver.h:835
bool PolarityInvertSDDirection(bool invert)
Function to invert the default polarity of the direction signal of this motor.
volatile const AlertRegMotor & AlertReg()
Accessor for the current Motor Alert Register.
Definition: MotorDriver.h:886
StatusRegMotor StatusRegFallen()
Clear on read accessor for Motor Status Register falling edge detection.
Definition: MotorDriver.h:230
uint32_t reg
Definition: MotorDriver.h:255
ClearCorePins InputAConnector()
Definition: MotorDriver.h:1262
HlfbModes
Setup the HLFB query to match the ClearPathâ„¢ Motor&#39;s HLFB signaling format.
Definition: MotorDriver.h:168
ClearCorePins InputBConnector()
Definition: MotorDriver.h:1311
ClearCorePins LimitSwitchPos()
Get the associated positive limit switch output connector.
Definition: MotorDriver.h:1084
ClearCore motor connector class.
Definition: MotorDriver.h:79
#define DEFAULT_TRIGGER_PULSE_WIDTH_MS
Definition: MotorDriver.h:57
ClearCorePins EStopConnector()
Definition: MotorDriver.h:1359
Connector::ConnectorTypes Type() override
Get connector type.
Definition: MotorDriver.h:461
bool HlfbActiveLevel()
Definition: MotorDriver.h:1408
AlertRegMotor(uint32_t val)
Definition: MotorDriver.h:401
virtual bool Move(int32_t dist, MoveTarget moveTarget=MOVE_TARGET_REL_END_POSN) override
Issues a positional move for the specified distance.
StatusRegMotor StatusRegRisen()
Clear on read accessor for Motor Status Register rising edge detection.
Namespace to encompass the ClearCore board API.
Definition: AdcManager.h:36
HlfbModes HlfbMode()
Accessor for current HLFB operational mode.
Definition: MotorDriver.h:733
LED shift register access class.
bool HlfbCarrier(HlfbCarrierFrequency freq)
Set the HLFB carrier frequency signal.
Definition: MotorDriver.h:781
bool PolarityInvertSDEnable(bool invert)
Function to invert the default polarity of the enable signal of this motor.
Base class for all connector classes.
void EnableActiveLevel(bool activeLevel)
Definition: MotorDriver.h:1379
ClearCore Status Register Manager class.
Definition: StatusManager.h:37
Definition: MotorDriver.h:178
ConnectorModes
All possible operational modes for a connector.
Definition: Connector.h:74
ClearCorePins BrakeOutput()
Get the associated brake output connector.
Definition: MotorDriver.h:1015
PolarityInversionsSD()
Definition: MotorDriver.h:121
bool PolarityInvertSDHlfb(bool invert)
Function to invert the default polarity of the HLFB signal of this motor.
SysManager SysMgr
System manager.
Definition: MotorDriver.h:59
ClearCore Digital Input Connector class.
bool MotorInBDuty(uint8_t duty)
Function to set the duty cycle of a PWM signal being sent to the motor&#39;s Input B. ...
Definition: MotorDriver.h:152
int16_t reg
Definition: MotorDriver.h:98
HlfbCarrierFrequency
High-Level Feedback (HLFB) carrier frequency: 45 Hz or 482 Hz.
Definition: MotorDriver.h:210
bool InputFallen()
Clear on read accessor for this connector&#39;s falling input state.
Definition: MotorDriver.h:226
Definition: MotorDriver.h:190
Definition: MotorDriver.h:242
HlfbCarrierFrequency HlfbCarrier()
This motor&#39;s HLFB carrier frequency.
Definition: MotorDriver.h:820
uint32_t directionInverted
Definition: MotorDriver.h:111
Definition: MotorDriver.h:161
volatile const bool & EnableTriggerPulseActive()
Check to see if enable trigger pulses are actively being sent.
Definition: MotorDriver.h:657
struct ClearCore::MotorDriver::PolarityInversionsSD::@1 bit
ClearCorePins LimitSwitchNeg()
Get the associated negative limit switch output connector.
Definition: MotorDriver.h:1153
#define CPM_HLFB_CAP_HISTORY
Definition: MotorDriver.h:49
bool MotorInAState()
Accessor for the state of the motor&#39;s Input A.
Definition: Connector.h:264
Register access for information about the motor&#39;s operating status. Intended for use in Step and Dire...
Definition: MotorDriver.h:251
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...
void HlfbFilterLength(uint16_t samples)
Sets the filter length in samples. The default is 3 samples.
Definition: MotorDriver.h:446
ClearCore Step and Direction generator class.
Definition: StepGenerator.h:56
ClearCore Board Supervisory System Manager.
Definition: SysManager.h:58
ClearCore motor-connector manager.
Definition: MotorManager.h:46
bool EnableRequest()
Accessor for the enable request state of the motor.
Definition: MotorDriver.h:548
Accumulating register of alerts that have occurred on this motor. Intended for use in Step and Direct...
Definition: MotorDriver.h:345
bool ValidateMove(bool negDirection)
ClearCorePins
ClearCore PIN definitions.
Definition: SysConnectors.h:54
ClearCore common utility functions.
HlfbStates
Return state when HLFB state is requested.
Definition: MotorDriver.h:144
A small register with bit and field views. This allows easy configuration for steppers that use an in...
Definition: MotorDriver.h:94
virtual bool MoveVelocity(int32_t velocity) override
Issues a velocity move at the specified velocity.
bool HlfbInputStatus()
Definition: MotorDriver.h:1369
uint32_t reg
Definition: MotorDriver.h:349
StatusRegMotor()
Definition: MotorDriver.h:327
bool IsWritable() override
Get R/W status of the connector.
Definition: MotorDriver.h:476
volatile const HlfbStates & HlfbState()
Return the latest HLFB state information.
Definition: MotorDriver.h:676
virtual ConnectorModes Mode()
Get the connector&#39;s operational mode.
Definition: Connector.h:309
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:899
ConnectorTypes
The different types of ClearCore connectors.
Definition: Connector.h:172
bool InputRisen()
Clear on read accessor for this connector&#39;s rising input state.