mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
drivers/wireless/bluetooth: Fix error in testing if interrupts enabled.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user