diff core/Utilities.cpp @ 72:d837fb676977

Documentation updates and include Arduino-type constants in Utilities.h
author andrewm
date Fri, 17 Jul 2015 20:09:50 +0100
parents a6d223473ea2
children 8bd351ca8b46
line wrap: on
line diff
--- a/core/Utilities.cpp	Fri Jul 17 17:53:40 2015 +0100
+++ b/core/Utilities.cpp	Fri Jul 17 20:09:50 2015 +0100
@@ -68,7 +68,7 @@
 // Sets the direction of a digital pin for the current frame and all subsequent frames
 void pinModeFrame(BeagleRTContext *context, int frame, int channel, int mode) {
 	for(unsigned int f = frame; f < context->digitalFrames; f++) {
-		if(mode)
+		if(mode == OUTPUT)
 			context->digital[f] |= (1 << channel);
 		else
 			context->digital[f] &= ~(1 << channel);
@@ -79,7 +79,7 @@
 //
 // Sets the direction of a digital pin for the current frame only
 void pinModeFrameOnce(BeagleRTContext *context, int frame, int channel, int mode) {
-	if(mode)
+	if(mode == OUTPUT)
 		context->digital[frame] |= (1 << channel);
 	else
 		context->digital[frame] &= ~(1 << channel);