@@ -67,23 +67,23 @@ static inline uint32_t mapResolution(uint32_t value,
6767
6868PinStatus digitalReadClearCore (pin_size_t conNum) {
6969 // check if trying to read a motor input
70- if (conNum > CLEARCORE_PIN_MAX && conNum <= INBM3 ) {
70+ if (conNum > CLEARCORE_PIN_MAX && conNum <= M3_INB ) {
7171 int motorPin = -1 ;
7272 switch (conNum) {
73- case INAM0 :
74- case INBM0 :
73+ case M0_INA :
74+ case M0_INB :
7575 motorPin = M0;
7676 break ;
77- case INAM1 :
78- case INBM1 :
77+ case M1_INA :
78+ case M1_INB :
7979 motorPin = M1;
8080 break ;
81- case INAM2 :
82- case INBM2 :
81+ case M2_INA :
82+ case M2_INB :
8383 motorPin = M2;
8484 break ;
85- case INAM3 :
86- case INBM3 :
85+ case M3_INA :
86+ case M3_INB :
8787 motorPin = M3;
8888 break ;
8989 }
@@ -94,7 +94,7 @@ PinStatus digitalReadClearCore(pin_size_t conNum) {
9494 ClearCore::SysMgr.ConnectorByIndex (
9595 static_cast <ClearCorePins>(motorPin)));
9696
97- if (conNum > CLEARCORE_PIN_MAX && conNum < INBM0 ) {
97+ if (conNum > CLEARCORE_PIN_MAX && conNum < M0_INB ) {
9898 return motor->MotorInAState () ? LOW : HIGH;
9999 }
100100 else {
@@ -121,23 +121,23 @@ PinStatus digitalReadClearCore(pin_size_t conNum) {
121121
122122void digitalWriteClearCore (pin_size_t conNum, PinStatus ulVal) {
123123 // check if trying to write to a motor input
124- if (conNum > CLEARCORE_PIN_MAX && conNum <= INBM3 ) {
124+ if (conNum > CLEARCORE_PIN_MAX && conNum <= M3_INB ) {
125125 int motorPin = -1 ;
126126 switch (conNum) {
127- case INAM0 :
128- case INBM0 :
127+ case M0_INA :
128+ case M0_INB :
129129 motorPin = M0;
130130 break ;
131- case INAM1 :
132- case INBM1 :
131+ case M1_INA :
132+ case M1_INB :
133133 motorPin = M1;
134134 break ;
135- case INAM2 :
136- case INBM2 :
135+ case M2_INA :
136+ case M2_INB :
137137 motorPin = M2;
138138 break ;
139- case INAM3 :
140- case INBM3 :
139+ case M3_INA :
140+ case M3_INB :
141141 motorPin = M3;
142142 break ;
143143 }
@@ -148,7 +148,7 @@ void digitalWriteClearCore(pin_size_t conNum, PinStatus ulVal) {
148148 ClearCore::SysMgr.ConnectorByIndex (
149149 static_cast <ClearCorePins>(motorPin)));
150150
151- if (conNum > CLEARCORE_PIN_MAX && conNum < INBM0 ) {
151+ if (conNum > CLEARCORE_PIN_MAX && conNum < M0_INB ) {
152152 motor->MotorInAState (ulVal);
153153 }
154154 else {
0 commit comments