The following text can be found in the usbconfig.h file.
/* ----------------------- Optional Hardware Config ------------------------ */
/* #define USB_CFG_PULLUP_IOPORTNAME D */
/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
* V+, you can connect and disconnect the device from firmware by calling
* the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
* This constant defines the port on which the pullup resistor is connected.
/* #define USB_CFG_PULLUP_BIT 4 */
/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
* above) where the 1.5k pullup resistor is connected. See description
* above for details.
A search on "USB_CFG_PULLUP_IOPORTNAME" does not find any discussion about the practical use of this "feature". I am wondering if anyone has actually used it and can give some guidance.
What I would like to do, if it is actually possible, is to have a Tiny85 powered up without usb being initiated yet and monitoring a particular pin. When the pin goes high, I want to then set the "USB_CFG_PULLUP_BIT" high which, if I have read correctly, should then cause usbDeviceConnect() to be actioned. Is that how it should work? Like a "conditional keyboard".
I haven't found this in any of the example projects yet.
Thanks for your help.