Skip to content

Modify USB profile to remove serial port - just want keyboard (Leonardo) #6387

Closed
@unicorn79

Description

@unicorn79

Hello! I'm using IDE 1.8.0 and Arduino leonardo. I try the standard USB HID keyboard sketch. Please tell me how to disable the serial port that appears in Device manager (Windows 7 x64) when the device is connected (after the bootloader finish) - it's called Arduino Leonardo (COM 40) for example. But i need, that there is only a USB HID keyboard and nothing else.
In this thread, dude seem to have decided this question:
Link
but the structure of the USBDesc.h file in my IDE 1.8.0 is different ...

#define PLUGGABLE_USB_ENABLED

#if defined(EPRST6)
#define USB_ENDPOINTS 7 // AtMegaxxU4
#else
#define USB_ENDPOINTS 5 // AtMegaxxU2
#endif

#define ISERIAL_MAX_LEN     20

#define CDC_INTERFACE_COUNT	2
#define CDC_ENPOINT_COUNT	3

#define CDC_ACM_INTERFACE	0	// CDC ACM
#define CDC_DATA_INTERFACE	1	// CDC Data
#define CDC_FIRST_ENDPOINT	1
#define CDC_ENDPOINT_ACM	(CDC_FIRST_ENDPOINT)							// CDC First
#define CDC_ENDPOINT_OUT	(CDC_FIRST_ENDPOINT+1)
#define CDC_ENDPOINT_IN		(CDC_FIRST_ENDPOINT+2)

#define INTERFACE_COUNT		(MSC_INTERFACE + MSC_INTERFACE_COUNT)

#define CDC_RX CDC_ENDPOINT_OUT
#define CDC_TX CDC_ENDPOINT_IN

#define IMANUFACTURER   1
#define IPRODUCT        2
#define ISERIAL         3

Any ideas? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: USB DeviceOpposed to USB Host. Related to the USB subsystem (SerialUSB, HID, ...)Library: HIDThe HID Arduino libraryType: WontfixArduino has decided that it will not resolve the reported issue or implement the requested featureUSB: CDC serialSerial interface used by MCUs with native USB (e.g. Leonardo) to communicate with the computerfeature requestA request to make an enhancement (not a bug fix)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions