Skip to content

Commit d17fafb

Browse files
committed
修改rt_spi_bus_configure判忙条件
1 parent c7d8220 commit d17fafb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

components/drivers/spi/dev_spi_core.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,17 @@ rt_err_t rt_spi_bus_configure(struct rt_spi_device *device)
150150
LOG_E("SPI device %s configuration failed", device->parent.parent.name);
151151
}
152152
}
153-
else
154-
{
155-
/* RT_EBUSY is not an error condition and
156-
* the configuration will take effect once the device has the bus
157-
*/
158-
result = -RT_EBUSY;
159-
}
160153

161154
/* release lock */
162155
rt_mutex_release(&(device->bus->lock));
163156
}
157+
else
158+
{
159+
/* RT_EBUSY is not an error condition and
160+
* the configuration will take effect once the device has the bus
161+
*/
162+
result = -RT_EBUSY;
163+
}
164164
}
165165
else
166166
{

0 commit comments

Comments
 (0)