drivers/wireless/bluetooth: Fix error in testing if interrupts enabled.

This commit is contained in:
Gregory Nutt
2018-04-17 07:13:03 -06:00
parent 8814533e78
commit 0271a6a5e9
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -827,13 +827,15 @@ static bool hciuart_isenabled(const struct hciuart_config_s *config,
*/
regval = hciuart_getreg32(config, STM32_USART_CR1_OFFSET);
if ((regval & USART_CR1_USED_INTS) != 0)
regval &= USART_CR1_USED_INTS;
if ((regval & intset) != 0)
{
return true;
}
regval = hciuart_getreg32(config, STM32_USART_CR3_OFFSET);
if ((regval & USART_CR3_EIE) != 0)
regval &= USART_CR3_EIE;
if ((regval & intset) != 0)
{
return true;
}
+2
View File
@@ -339,6 +339,8 @@ static int btuart_open(FAR const struct bt_driver_s *dev)
FAR struct btuart_upperhalf_s *upper;
FAR const struct btuart_lowerhalf_s *lower;
wlinfo("dev %p\n", dev);
upper = (FAR struct btuart_upperhalf_s *)dev;
DEBUGASSERT(upper != NULL && upper->lower != NULL);
lower = upper->lower;