From: Keith Packard Date: Sat, 7 May 2011 05:59:15 +0000 (-0700) Subject: altos: Hook up the P1 ISR for TeleBT v0.1 bt_link line X-Git-Tag: 0.9.3~40^2~2 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=8be559baa979c15e78f8dba7879b383dbe3936d3 altos: Hook up the P1 ISR for TeleBT v0.1 bt_link line Otherwise, we're heading off into the weeds... Signed-off-by: Keith Packard --- diff --git a/src/ao.h b/src/ao.h index 226f9a22..600c488a 100644 --- a/src/ao.h +++ b/src/ao.h @@ -1367,9 +1367,17 @@ ao_packet_slave_init(uint8_t enable); /* ao_btm.c */ -/* Shared by USB, so the USB code calls this function */ +/* If bt_link is on P2, this interrupt is shared by USB, so the USB + * code calls this function. Otherwise, it's a regular ISR. + */ + void -ao_btm_isr(void); +ao_btm_isr(void) +#if BT_LINK_ON_P1 + __interrupt 15 +#endif + ; + void ao_btm_init(void); diff --git a/src/ao_btm.c b/src/ao_btm.c index 490b2667..172004e9 100644 --- a/src/ao_btm.c +++ b/src/ao_btm.c @@ -253,6 +253,9 @@ ao_btm_check_link() __critical void ao_btm_isr(void) +#if BT_LINK_ON_P1 + __interrupt 15 +#endif { if (BT_PIFG & (1 << BT_LINK_PIN_INDEX)) { ao_btm_check_link(); diff --git a/src/ao_usb.c b/src/ao_usb.c index ece6756a..dd752152 100644 --- a/src/ao_usb.c +++ b/src/ao_usb.c @@ -59,8 +59,10 @@ ao_usb_isr(void) __interrupt 6 if (USBCIF & USBCIF_RSTIF) ao_usb_set_interrupts(); #if HAS_BTM +#if BT_LINK_ON_P2 ao_btm_isr(); #endif +#endif } struct ao_usb_setup {