#ifndef __CPHIDGETENCODER #define __CPHIDGETENCODER #include "cphidget.h" /** \defgroup phidenc Phidget Encoder * \ingroup phidgets * Calls specific to the Phidget Encoder. See the product manual for more specific API details, supported functionality, units, etc. * @{ */ DPHANDLE(Encoder) CHDRSTANDARD(Encoder) /** * Gets the number of digital inputs supported by this board. * @param phid An attached phidget encoder handle * @param count The input count. */ CHDRGET(Encoder,InputCount,int *count) /** * Gets the state of a digital input. * @param phid An attached phidget encoder handle * @param index The input index. * @param inputState The input state. Possible values are \ref PTRUE and \ref PFALSE. */ CHDRGETINDEX(Encoder,InputState,int *inputState) /** * Sets an input change handler. This is called when a digital input changes. * @param phid An attached phidget encoder handle * @param fptr Callback function pointer. * @param userPtr A pointer for use by the user - this value is passed back into the callback function. */ CHDREVENTINDEX(Encoder,InputChange,int inputState) /** * Gets the number of encoder inputs supported by this board. * @param phid An attached phidget encoder handle * @param count The encoder input count. */ CHDRGET(Encoder,EncoderCount,int *count) /** * Gets the current position of an encoder. * @param phid An attached phidget encoder handle * @param index The encoder input index. * @param position The current position */ CHDRGETINDEX(Encoder,Position,int *position) /** * Sets the current position of an encoder. * @param phid An attached phidget encoder handle * @param index The encoder input index. * @param position The new position */ CHDRSETINDEX(Encoder,Position,int position) /** * Sets an encoder change handler. This is called when an encoder position changes. * @param phid An attached phidget encoder handle * @param fptr Callback function pointer. Note that positionChange is a relative not absolute change and time is the time * in ms since the last position change event. * @param userPtr A pointer for use by the user - this value is passed back into the callback function. */ CHDREVENTINDEX(Encoder,PositionChange,int time,int positionChange) /** * Gets the position of the last index pulse, as referenced to \ref CPhidgetEncoder_getPosition. * This will return EPHIDGET_UNKNOWN if there hasn't been an index event, or if the encoder doesn't support index. * @param phid An attached phidget encoder handle * @param index The encoder index. * @param position The index position. */ CHDRGETINDEX(Encoder,IndexPosition,int *position) /** * Gets the enabled state of an encoder. This is whether the encoder is powered or not. * @param phid An attached phidget encoder handle * @param index The encoder index. * @param enabledState The enabled state. Possible values are \ref PTRUE and \ref PFALSE. */ CHDRGETINDEX(Encoder,Enabled,int *enabledState) /** * Sets the enabled state of an encoder. This is whether the encoder is powered or not. * @param phid An attached phidget encoder handle * @param index The encoder index. * @param enabledState The enabled state. Possible values are \ref PTRUE and \ref PFALSE. */ CHDRSETINDEX(Encoder,Enabled,int enabledState) #ifndef REMOVE_DEPRECATED DEP_CHDRGETINDEX("Deprecated - use CPhidgetEncoder_getPosition",Encoder,EncoderPosition,int *) DEP_CHDRSETINDEX("Deprecated - use CPhidgetEncoder_setPosition",Encoder,EncoderPosition,int) DEP_CHDRGET("Deprecated - use CPhidgetEncoder_getInputCount",Encoder,NumInputs,int *) DEP_CHDRGET("Deprecated - use CPhidgetEncoder_getEncoderCount",Encoder,NumEncoders,int *) #endif #ifndef EXTERNALPROTO #define ENCODER_MAXENCODERS 4 #define ENCODER_MAXINPUTS 4 struct _CPhidgetEncoder { CPhidget phid; int (CCONV *fptrInputChange) (CPhidgetEncoderHandle, void *, int, int); void *fptrInputChangeptr; int (CCONV *fptrPositionChange) (CPhidgetEncoderHandle, void *, int, int, int); void *fptrPositionChangeptr; unsigned char inputState[ENCODER_MAXINPUTS]; int encoderPosition[ENCODER_MAXENCODERS]; int encoderTimeStamp[ENCODER_MAXENCODERS]; unsigned char enableState[ENCODER_MAXENCODERS]; unsigned char enableStateEcho[ENCODER_MAXENCODERS]; int indexPosition[ENCODER_MAXENCODERS]; unsigned char outputPacket[8]; unsigned int outputPacketLen; } typedef CPhidgetEncoderInfo; #endif /** @} */ #endif t/smoketest.sh?h=master&id=52df507b2fc152a99b816fd88e9bc8bfe05e0d7d&follow=1'>cleanup & cosmeticsmichael5-22/+31 2008-12-24driver for the PHAnderson serial-to-HD44780 adapter boards by Nicolas Weillmichael5-5/+444 2008-12-24w1retap plugin by Jonathan Hudsonmichael7-0/+298 2008-12-24Enables/controls the backlight on the Pertelian LCD device by Jonathan Hudsonmichael1-10/+13 2008-12-23hddtemp plugin from Scott Bronsonmichael7-0/+343 2008-12-23keypad bug fixedmichael1-1/+1 2008-12-23patch from a.nielsen: inverted parport signals, support GPI on HD44780michael2-24/+89 2008-12-23indent runmichael1-4/+4 2008-11-25fix lcd4linux driver for multible onboard controllersmichux1-4/+4 2008-11-23fix automake - check for libftdimichux4-9/+173 2008-11-22update button_exec plugin - fix segfaultmichux1-3/+2 2008-11-22update fifo plugin - untestedmichux1-1/+1 2008-10-07Replace write to external variable usb_debug by calling usb_set_debug().bwalle7-16/+7 2008-10-06adding GPI to picoLCD for reading button events by Igor Mammedov <niallain@g...michael1-1/+22 2008-10-06properties fixedmichael11-3290/+2675 2008-10-05Rebuild auto-generated autoconf stuff due to last change in drivers.m4.bwalle3-2657/+3297 2008-10-05Add 'ULA200' driver when --with-drivers=all is specifiedbwalle1-0/+1 2008-09-14strftime_tz patch from Bernhard Wallemichael1-0/+11 2008-09-08strftime_tz() plugin by Bernhard Wallemichael1-0/+25 2008-09-03ULA200 driver by Bernhard Wallemichael7-2/+825 2008-09-03indentmichael1-4/+4 2008-08-31Increased the maximum bps to 230400, if defined in <termios.h>.sonic741-2/+7 2008-08-27git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@889 3ae390bd-cb1e-0410-...sonic741-18/+11 2008-08-27D4D updates by Svenmichael1-38/+60 2008-08-03driver for 4D Systems serial displays by Sven Killigmichael9-45/+846 2008-08-03signed/unsigned mismatchmichael1-3/+3 2008-07-26added command functionsmichux1-2/+130 2008-07-15added IRLCD driver by Jean-Philippe Civademichael10-5/+467 2008-07-15'autoreconf -f -i' run & config.rpath addedmichael8-370/+1617