To use, for example, PCINT16 on an ATmega168, the following configuration needs to be set in usbconfig.h:
near the top:
Code: Select all
#define USB_CFG_DPLUS_BIT 0 // PD0 is PCINT16
at the end:
Code: Select all
#define USB_INTR_CFG PCMSK2
#define USB_INTR_CFG_SET (1 << PCINT16)
#define USB_INTR_CFG_CLR 0
#define USB_INTR_ENABLE PCICR
#define USB_INTR_ENABLE_BIT PCIE2
#define USB_INTR_PENDING PCIFR
#define USB_INTR_PENDING_BIT PCIF2
#define USB_INTR_VECTOR SIG_PIN_CHANGE2
Cheers,
Chris