OverviewFilesCommitsIssuesDocsReleasesPeers

cthuloid commits / 8bafc10

zorko made macro version of min function
8bafc1005de4cfa3e711a40a3b39e2aba76e5bb2
by plankatron <fleeky@gmail.com> · 2019-02-03T22:50:28.000Z

Changed files (1) +4 -1

Arduino/libraries/SC/SC.cpp +4 -1
……@@ -23,6 +23,9 @@
2323 */
2424#include "SC.h"
2525
26#define MAX(x, y) (((x) > (y)) ? (x) : (y))
27#define MIN(x, y) (((x) < (y)) ? (x) : (y))
28
2629/**
2730 * Constructor makes sure some things are set.
2831 */
……@@ -146,7 +149,7 @@ void SerialCommand::handleChar(char inChar) {
146149}
147150
148151void SerialCommand::enterBinaryMode(int numBytes, void (*function)(char*, int)) {
149 numBinaryBytes = min(sizeof(buffer), numBytes);
152 numBinaryBytes = MIN(sizeof(buffer), numBytes);
150153 binaryDone = function;
151154 clearBuffer();
152155}