Otherwise, we're heading off into the weeds...
Signed-off-by: Keith Packard <keithp@keithp.com>
/* 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);
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();
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 {