From 7ab6dfeeba2c172a3c2adda6478dab52c0b58364 Mon Sep 17 00:00:00 2001 From: peabody124 Date: Fri, 24 Dec 2010 17:16:07 +0000 Subject: [PATCH] PiOS/USB_HID: Lower priority of USB interrupt git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2280 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/PiOS/STM32F10x/pios_usb_hid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flight/PiOS/STM32F10x/pios_usb_hid.c b/flight/PiOS/STM32F10x/pios_usb_hid.c index 2c6bb7ae5..ed34fb300 100644 --- a/flight/PiOS/STM32F10x/pios_usb_hid.c +++ b/flight/PiOS/STM32F10x/pios_usb_hid.c @@ -96,9 +96,8 @@ int32_t PIOS_USB_HID_Init(uint32_t mode) /* Enable the USB Interrupts */ /* 2 bit for pre-emption priority, 2 bits for subpriority */ NVIC_InitTypeDef NVIC_InitStructure; - NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); NVIC_InitStructure.NVIC_IRQChannel = USB_LP_CAN1_RX0_IRQn; - NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 8; + NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_LOW; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure);