usb interrupt ( answered )

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

usb interrupt ( answered )

Post by ulao » Mon Aug 10, 2009 10:34 pm

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?
Last edited by ulao on Tue Aug 11, 2009 4:57 pm, edited 3 times in total.

ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

usb interrupt

Post by ulao » Tue Aug 11, 2009 1:50 am

dup, sorry.

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Re: usb interrupt

Post by Grendel » Tue Aug 11, 2009 7:24 am

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.

ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

Re: usb interrupt ( answered )

Post by ulao » Tue Aug 11, 2009 4:57 pm

Great, thx!

Post Reply