aboutsummaryrefslogtreecommitdiffstats
path: root/phidget21.h
diff options
context:
space:
mode:
Diffstat (limited to 'phidget21.h')
-rw-r--r--phidget21.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/phidget21.h b/phidget21.h
index 6793b3f..3a85c04 100644
--- a/phidget21.h
+++ b/phidget21.h
@@ -1,3 +1,6 @@
+#ifndef PHIDGET_H
+#define PHIDGET_H
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -70,6 +73,7 @@ typedef enum {
PHIDID_MOTORCONTROL_1MOTOR = 0x03E,
PHIDID_MOTORCONTROL_HC_2MOTOR = 0x059,
PHIDID_RFID_2OUTPUT = 0x031,
+ PHIDID_RFID_2OUTPUT_READ_WRITE = 0x034,
PHIDID_ROTARY_TOUCH = 0x077,
PHIDID_SPATIAL_ACCEL_3AXIS = 0x07F,
PHIDID_SPATIAL_ACCEL_GYRO_COMPASS = 0x033,
@@ -147,7 +151,7 @@ typedef enum {
PHIDUID_RFID,
PHIDUID_RFID_2OUTPUT_NO_ECHO,
PHIDUID_RFID_2OUTPUT,
- PHIDUID_RFID_2OUTPUT_ADVANCED,
+ PHIDUID_RFID_2OUTPUT_READ_WRITE,
PHIDUID_SERVO_1MOTOR_OLD,
PHIDUID_SERVO_4MOTOR_OLD,
PHIDUID_SERVO_1MOTOR_NO_ECHO,
@@ -557,12 +561,14 @@ typedef enum {
PHIDGET_LED_VOLTAGE_5_0V
} CPhidgetLED_Voltage;
int CPhidgetLED_getLEDCount(CPhidgetLEDHandle phid, int *count);
- int CPhidgetLED_getDiscreteLED(CPhidgetLEDHandle phid, int index, int *brightness);
- int CPhidgetLED_setDiscreteLED(CPhidgetLEDHandle phid, int index, int brightness);
int CPhidgetLED_getCurrentLimit(CPhidgetLEDHandle phid, CPhidgetLED_CurrentLimit *currentLimit);
int CPhidgetLED_setCurrentLimit(CPhidgetLEDHandle phid, CPhidgetLED_CurrentLimit currentLimit);
int CPhidgetLED_getVoltage(CPhidgetLEDHandle phid, CPhidgetLED_Voltage *voltage);
int CPhidgetLED_setVoltage(CPhidgetLEDHandle phid, CPhidgetLED_Voltage voltage);
+ int CPhidgetLED_getBrightness(CPhidgetLEDHandle phid, int index, double *brightness);
+ int CPhidgetLED_setBrightness(CPhidgetLEDHandle phid, int index, double brightness);
+ int CPhidgetLED_getCurrentLimitIndexed(CPhidgetLEDHandle phid, int index, double *limit);
+ int CPhidgetLED_setCurrentLimitIndexed(CPhidgetLEDHandle phid, int index, double limit);
typedef struct _CPhidgetMotorControl *CPhidgetMotorControlHandle;
int CPhidgetMotorControl_create(CPhidgetMotorControlHandle *phid);
int CPhidgetMotorControl_getMotorCount(CPhidgetMotorControlHandle phid, int *count);
@@ -611,6 +617,11 @@ typedef struct _CPhidgetPHSensor *CPhidgetPHSensorHandle;
int CPhidgetPHSensor_setTemperature(CPhidgetPHSensorHandle phid, double temperature);
typedef struct _CPhidgetRFID *CPhidgetRFIDHandle;
int CPhidgetRFID_create(CPhidgetRFIDHandle *phid);
+typedef enum {
+ PHIDGET_RFID_PROTOCOL_EM4100 = 1,
+ PHIDGET_RFID_PROTOCOL_ISO11785_FDX_B,
+ PHIDGET_RFID_PROTOCOL_PHIDGETS,
+} CPhidgetRFID_Protocol;
int CPhidgetRFID_getOutputCount(CPhidgetRFIDHandle phid, int *count);
int CPhidgetRFID_getOutputState(CPhidgetRFIDHandle phid, int index, int *outputState);
int CPhidgetRFID_setOutputState(CPhidgetRFIDHandle phid, int index, int outputState);
@@ -619,10 +630,11 @@ typedef struct _CPhidgetRFID *CPhidgetRFIDHandle;
int CPhidgetRFID_setAntennaOn(CPhidgetRFIDHandle phid, int antennaState);
int CPhidgetRFID_getLEDOn(CPhidgetRFIDHandle phid, int *LEDState);
int CPhidgetRFID_setLEDOn(CPhidgetRFIDHandle phid, int LEDState);
- int CPhidgetRFID_getLastTag(CPhidgetRFIDHandle phid, unsigned char *tag);
+ int CPhidgetRFID_getLastTag2(CPhidgetRFIDHandle phid, char **tagString, CPhidgetRFID_Protocol *protocol);
int CPhidgetRFID_getTagStatus(CPhidgetRFIDHandle phid, int *status);
- int CPhidgetRFID_set_OnTag_Handler(CPhidgetRFIDHandle phid, int ( *fptr)(CPhidgetRFIDHandle phid, void *userPtr, unsigned char *tag), void *userPtr);
- int CPhidgetRFID_set_OnTagLost_Handler(CPhidgetRFIDHandle phid, int ( *fptr)(CPhidgetRFIDHandle phid, void *userPtr, unsigned char *tag), void *userPtr);
+ int CPhidgetRFID_write(CPhidgetRFIDHandle phid, char *tagString, CPhidgetRFID_Protocol protocol, int lock);
+ int CPhidgetRFID_set_OnTag2_Handler(CPhidgetRFIDHandle phid, int ( *fptr)(CPhidgetRFIDHandle phid, void *userPtr, char *tagString, CPhidgetRFID_Protocol protocol), void *userPtr);
+ int CPhidgetRFID_set_OnTagLost2_Handler(CPhidgetRFIDHandle phid, int ( *fptr)(CPhidgetRFIDHandle phid, void *userPtr, char *tagString, CPhidgetRFID_Protocol protocol), void *userPtr);
typedef struct _CPhidgetServo *CPhidgetServoHandle;
int CPhidgetServo_create(CPhidgetServoHandle *phid);
int CPhidgetServo_getMotorCount(CPhidgetServoHandle phid, int *count);
@@ -862,3 +874,4 @@ typedef struct _CPhidgetWeightSensor *CPhidgetWeightSensorHandle;
#ifdef __cplusplus
}
#endif
+#endif \ No newline at end of file