aboutsummaryrefslogtreecommitdiffstats
path: root/cphidgetled.h
diff options
context:
space:
mode:
Diffstat (limited to 'cphidgetled.h')
-rw-r--r--cphidgetled.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/cphidgetled.h b/cphidgetled.h
index c6d7b4e..e9ec6fe 100644
--- a/cphidgetled.h
+++ b/cphidgetled.h
@@ -4,7 +4,7 @@
/** \defgroup phidled Phidget LED
* \ingroup phidgets
- * Calls specific to the Phidget LED. See the product manual for more specific API details, supported functionality, units, etc.
+ * These calls are specific to the Phidget LED object. See your device's User Guide for more specific API details, technical information, and revision details. The User Guide, along with other resources, can be found on the product page for your device.
* @{
*/
@@ -75,6 +75,14 @@ CHDRGET(LED,Voltage,CPhidgetLED_Voltage *voltage)
*/
CHDRSET(LED,Voltage,CPhidgetLED_Voltage voltage)
+//Only exposed in debug library for now
+#if !defined(EXTERNALPROTO) || defined(DEBUG)
+CHDRGETINDEX(LED,Brightness,double *brightness)
+CHDRSETINDEX(LED,Brightness,double brightness)
+CHDRGETINDEX(LED,CurrentLimitIndexed,double *limit)
+CHDRSETINDEX(LED,CurrentLimitIndexed,double limit)
+#endif
+
#ifndef REMOVE_DEPRECATED
DEP_CHDRGET("Deprecated - use CPhidgetLED_getLEDCount",LED,NumLEDs,int *)
#endif
@@ -88,10 +96,15 @@ DEP_CHDRGET("Deprecated - use CPhidgetLED_getLEDCount",LED,NumLEDs,int *)
#define LED64_CONTROL_PACKET 0x40
#define LED64_OUTLOW_PACKET 0x80
#define LED64_OUTHIGH_PACKET 0xc0
+#define LED64_M3_OUT_LOW_PACKET 0x00
+#define LED64_M3_OUT_HIGH_PACKET 0x20
+#define LED64_M3_CONTROL_PACKET 0x40
//IN Packet Types
#define LED64_IN_LOW_PACKET 0x00
#define LED64_IN_HIGH_PACKET 0x80
+#define LED64_M3_IN_LOW_PACKET 0x00
+#define LED64_M3_IN_HIGH_PACKET 0x40
//Flags
#define LED64_PGOOD_FLAG 0x01
@@ -102,20 +115,24 @@ DEP_CHDRGET("Deprecated - use CPhidgetLED_getLEDCount",LED,NumLEDs,int *)
#define LED64_FAULT_FLAG 0x20
#define LED64_OE_FLAG 0x40
+//M3 LED64
+#define LED64_M3_CURRENTLIMIT 80 //80 mA fixed TODO: make sure this is right!
+
struct _CPhidgetLED
{
CPhidget phid;
- int LED_Power[LED_MAXLEDS];
+ double LED_Power[LED_MAXLEDS];
+ double LED_CurrentLimit[LED_MAXLEDS];
CPhidgetLED_Voltage voltage;
CPhidgetLED_CurrentLimit currentLimit;
- int nextLED_Power[LED_MAXLEDS];
- int lastLED_Power[LED_MAXLEDS];
+ double nextLED_Power[LED_MAXLEDS];
+ double lastLED_Power[LED_MAXLEDS];
unsigned char changedLED_Power[LED_MAXLEDS];
unsigned char changeRequests;
- int LED_PowerEcho[LED_MAXLEDS];
+ double LED_PowerEcho[LED_MAXLEDS];
unsigned char outputEnabledEcho[LED_MAXLEDS];
unsigned char ledOpenDetectEcho[LED_MAXLEDS];
unsigned char powerGoodEcho;