Mercurial > hg > beaglert
diff examples/7segment/render.cpp @ 308:1feb9c23ac57 prerelease
Renamed read/write functions to remove the Frame --> e.g. analogWriteFrameOnce -> analogWriteOnce, digitalReadFrame -> digitalRead
author | andrewm |
---|---|
date | Fri, 27 May 2016 18:21:21 +0100 |
parents | e4392164b458 |
children | 02c4ca0e3718 |
line wrap: on
line diff
--- a/examples/7segment/render.cpp Fri May 27 18:12:15 2016 +0100 +++ b/examples/7segment/render.cpp Fri May 27 18:21:21 2016 +0100 @@ -80,25 +80,25 @@ // Write the currently displaying digit low and the rest high for(int i = 0; i < 4; i++) - digitalWriteFrameOnce(context, n, kPins[kDigits[i]], HIGH); - digitalWriteFrameOnce(context, n, kPins[kDigits[gCurrentlyDisplayingDigit]], LOW); + digitalWriteOnce(context, n, kPins[kDigits[i]], HIGH); + digitalWriteOnce(context, n, kPins[kDigits[gCurrentlyDisplayingDigit]], LOW); // Write the digit to the other outputs - digitalWriteFrameOnce(context, n, kPins[11], + digitalWriteOnce(context, n, kPins[11], gCharacterToDisplay[gCurrentlyDisplayingDigit] & 0x01); // a - digitalWriteFrameOnce(context, n, kPins[6], + digitalWriteOnce(context, n, kPins[6], gCharacterToDisplay[gCurrentlyDisplayingDigit] & 0x02); // b - digitalWriteFrameOnce(context, n, kPins[4], + digitalWriteOnce(context, n, kPins[4], gCharacterToDisplay[gCurrentlyDisplayingDigit] & 0x04); // c - digitalWriteFrameOnce(context, n, kPins[1], + digitalWriteOnce(context, n, kPins[1], gCharacterToDisplay[gCurrentlyDisplayingDigit] & 0x08); // d - digitalWriteFrameOnce(context, n, kPins[0], + digitalWriteOnce(context, n, kPins[0], gCharacterToDisplay[gCurrentlyDisplayingDigit] & 0x10); // e - digitalWriteFrameOnce(context, n, kPins[10], + digitalWriteOnce(context, n, kPins[10], gCharacterToDisplay[gCurrentlyDisplayingDigit] & 0x20); // f - digitalWriteFrameOnce(context, n, kPins[5], + digitalWriteOnce(context, n, kPins[5], gCharacterToDisplay[gCurrentlyDisplayingDigit] & 0x40); // g - digitalWriteFrameOnce(context, n, kPins[2], + digitalWriteOnce(context, n, kPins[2], gCharacterToDisplay[gCurrentlyDisplayingDigit] & 0x80); // . // Check for changing state