Skip to content

Commit

Permalink
Replaced GPIO_... macros with values
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliomoro committed Oct 19, 2020
1 parent 50f9e31 commit 24dc00d
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions server/plugins/BELAUGens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,12 +610,12 @@ void DigitalOut_next_a_once(DigitalOut* unit, int inNumSamples) {
// read input
newinput = in[n];
if (newinput > 0.5) {
digitalWriteOnce(context, n, pinid, GPIO_HIGH);
digitalWriteOnce(context, n, pinid, 1);
} else {
digitalWriteOnce(context, n, pinid, GPIO_LOW);
digitalWriteOnce(context, n, pinid, 0);
}
// else if ( lastOut == 1 ) {
// digitalWrite(context, n, pinid, GPIO_LOW );
// digitalWrite(context, n, pinid, 0 );
// }
}
// unit->mLastOut = lastOut;
Expand All @@ -638,11 +638,11 @@ void DigitalOut_next_a(DigitalOut* unit, int inNumSamples) {
if (newinput > 0.5) {
if (lastOut == 0) {
lastOut = 1;
digitalWrite(context, n, pinid, GPIO_HIGH);
digitalWrite(context, n, pinid, 1);
}
} else if (lastOut == 1) {
lastOut = 0;
digitalWrite(context, n, pinid, GPIO_LOW);
digitalWrite(context, n, pinid, 0);
}
}
unit->mLastOut = lastOut;
Expand All @@ -660,11 +660,11 @@ void DigitalOut_next_k(DigitalOut* unit, int inNumSamples) {
if (in > 0.5) {
if (lastOut == 0) {
lastOut = 1;
digitalWrite(context, 0, pinid, GPIO_HIGH);
digitalWrite(context, 0, pinid, 1);
}
} else if (lastOut == 1) {
lastOut = 0;
digitalWrite(context, 0, pinid, GPIO_LOW);
digitalWrite(context, 0, pinid, 0);
}
unit->mLastOut = lastOut;
}
Expand Down Expand Up @@ -1022,9 +1022,9 @@ void DigitalIO_next_akka_once(DigitalIO* unit, int inNumSamples) {
} else { // digital write
pinModeOnce(context, n, newpin, OUTPUT);
if (newinput > 0.5) {
newDigOut = GPIO_HIGH;
newDigOut = 1;
} else {
newDigOut = GPIO_LOW;
newDigOut = 0;
}
digitalWriteOnce(context, n, newpin, newDigOut);
}
Expand Down Expand Up @@ -1069,9 +1069,9 @@ void DigitalIO_next_ak(DigitalIO* unit, int inNumSamples) {
pinMode(context, 0, newpin, OUTPUT);
for (unsigned int n = 0; n < inNumSamples; n++) {
if (in > 0.5) {
newDigOut = GPIO_HIGH;
newDigOut = 1;
} else {
newDigOut = GPIO_LOW;
newDigOut = 0;
}
digitalWriteOnce(context, n, newpin, newDigOut);
// always write to the output of the UGen
Expand Down Expand Up @@ -1107,9 +1107,9 @@ void DigitalIO_next_kk(DigitalIO* unit, int inNumSamples) {
} else {
pinMode(context, 0, pinid, OUTPUT);
if (in > 0.5) {
newDigOut = GPIO_HIGH;
newDigOut = 1;
} else {
newDigOut = GPIO_LOW;
newDigOut = 0;
}
digitalWrite(context, 0, pinid, newDigOut);
}
Expand Down Expand Up @@ -1156,9 +1156,9 @@ void DigitalIO_next(DigitalIO *unit, int inNumSamples)
// pinModeOnce( context, n, newpin, OUTPUT );
pinMode( context, n, newpin, OUTPUT );
if ( newinput > 0.5 ){
newinputInt = GPIO_HIGH;
newinputInt = 1;
} else {
newinputInt = GPIO_LOW;
newinputInt = 0;
}
// digitalWriteOnce(context, n, newpin, newinputInt);
digitalWrite(context, n, newpin, newinputInt);
Expand Down

0 comments on commit 24dc00d

Please sign in to comment.