Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: PuggableUSB for Teensy ?

  1. #1
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    50

    PuggableUSB for Teensy ?

    Hi everyone,

    I'm currently working on an evolution of the Arduino Joystick Library, that is using AVR PluggableUSB system.
    Is there any plans to port PluggableUSB system to Teensy or has anyone done it ?

    Thanks

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,935
    What does it offer beyond the existing Teensy USB HID joystick ?
    https://www.pjrc.com/teensy/td_joystick.html

  3. #3
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    50
    A totally customisable class : you can choose the number of buttons, analog axes, hat switches, product name, VID, PID etc...

    Here's my current constructor (works on Leonardo):
    Code:
    class PluggableHID
    {
    public:
    	PluggableHID(
    		const uint8_t* productName,
    		const uint8_t* manufacturerName,
    		uint16_t vid = PHID_DEFAULT_VID,
    		uint16_t pid = PHID_DEFAULT_PID,
    		uint8_t hidReportId = PHID_DEFAULT_REPORT_ID,
    		uint8_t joystickType = PHID_TYPE_JOYSTICK,
    		uint8_t buttonCount = PHID_DEFAULT_BUTTON_COUNT,
    		uint8_t hatSwitchCount = PHID_DEFAULT_HATSWITCH_COUNT,
    		uint8_t	ledCount= PHID_DEFAULT_LED_COUNT,
    		uint8_t ffbAxisCount = PHID_DEFAULT_FFB_AXIS_COUNT,
    		uint8_t _axisNbBits = PHID_DEFAULT_AXIS_NB_BITS,
    		uint8_t	_simulatorNbBits = PHID_DEFAULT_SIMULATOR_NB_BITS,
    		uint32_t includeAxisFlags = 0,
    		uint16_t reportInputPaddingNbBits = 0,
    		uint16_t reportOutputPaddingNbBits = 0);
    }
    Last edited by Etienne; 05-25-2017 at 01:43 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •