diff options
author | Keith Packard <keithp@keithp.com> | 2011-04-07 22:00:38 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-04-07 22:00:38 -0700 |
commit | 1a54a58d72147888f783a3caf364479efff4ed9b (patch) | |
tree | 20d3352c5cc17ac5c55ca52df63a21e95d5d73ed /src/ao_usb.c | |
parent | f28efe271f9670473249574f6bcf6e160fe58c7b (diff) |
altos: Use PIO(6) on BTM to monitor BT connection. Fix BTM init.
PIo(6) appears to be an active-low indication of the Bluetooth
connection status. Hook this up using an interrupt to track the
link state instead of using in-band status messages.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_usb.c')
-rw-r--r-- | src/ao_usb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ao_usb.c b/src/ao_usb.c index b4e3f1fe..ece6756a 100644 --- a/src/ao_usb.c +++ b/src/ao_usb.c @@ -46,6 +46,7 @@ void ao_usb_isr(void) __interrupt 6 { USBIF = 0; + IRCON2 &= ~IRCON2_USBIF; ao_usb_iif |= USBIIF; if (ao_usb_iif & 1) ao_wakeup(&ao_usb_task); @@ -57,6 +58,9 @@ ao_usb_isr(void) __interrupt 6 if (USBCIF & USBCIF_RSTIF) ao_usb_set_interrupts(); +#if HAS_BTM + ao_btm_isr(); +#endif } struct ao_usb_setup { |