File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
tests/drivers/uart/uart_errors/src Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1313
1414#include <zephyr/drivers/uart.h>
1515#include <zephyr/pm/device.h>
16+ #include <zephyr/pm/device_runtime.h>
1617#include <zephyr/ztest.h>
1718#include <zephyr/logging/log.h>
1819LOG_MODULE_REGISTER (test , LOG_LEVEL_NONE );
@@ -334,6 +335,9 @@ static void test_detect_error(bool hwfc, int err_byte)
334335 }
335336
336337 if (IS_ENABLED (CONFIG_UART_INTERRUPT_DRIVEN )) {
338+ if (IS_ENABLED (CONFIG_PM_DEVICE_RUNTIME )) {
339+ pm_device_runtime_get (uart_dev );
340+ }
337341 uart_irq_err_enable (uart_dev );
338342 uart_irq_rx_enable (uart_dev );
339343 } else {
@@ -378,6 +382,9 @@ static void test_detect_error(bool hwfc, int err_byte)
378382 if (IS_ENABLED (CONFIG_UART_INTERRUPT_DRIVEN )) {
379383 uart_irq_err_disable (uart_dev );
380384 uart_irq_rx_disable (uart_dev );
385+ if (IS_ENABLED (CONFIG_PM_DEVICE_RUNTIME )) {
386+ pm_device_runtime_put (uart_dev );
387+ }
381388 } else {
382389 rx_active = false;
383390 err = uart_rx_disable (uart_dev );
You can’t perform that action at this time.
0 commit comments