Page 1 of 1

usb interrupt ( answered )

Posted: Mon Aug 10, 2009 10:34 pm
by ulao
I'm using an interrupt for pin-change and I wanted to disable the usb int for a short while, how can I do that without using disable all interrupts?

usb interrupt

Posted: Tue Aug 11, 2009 1:50 am
by ulao
dup, sorry.

Re: usb interrupt

Posted: Tue Aug 11, 2009 7:24 am
by Grendel
Use

Code: Select all

USB_INTR_ENABLE &= ~_BV( USB_INTR_ENABLE_BIT ) ;

to disable the interrupt and

Code: Select all

USB_INTR_ENABLE |= _BV( USB_INTR_ENABLE_BIT ) ;

to re-enable it.

Re: usb interrupt ( answered )

Posted: Tue Aug 11, 2009 4:57 pm
by ulao
Great, thx!