Skip to content

Commit

Permalink
drivers: serial: serial_test: Move ring buf dep to Kconfig
Browse files Browse the repository at this point in the history
This commit moves the dependency management between the
RING_BUFFER and UART_ASYNC_API or UART_INTERRUPT_DRIVEN
options to the Kconfig Kconfig.test.

If either UART API options listed are selected, the
RING_BUFFER option must be selected. This is now handled
automatically by Kconfig instead of causing a build
assert.

The asserts where added with this PR #59880, and are
removed in this commit.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
  • Loading branch information
Bjarki Arge Andreasen committed Sep 28, 2023
1 parent 4b80619 commit fae3cdd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions drivers/serial/Kconfig.test
Expand Up @@ -8,3 +8,4 @@ config SERIAL_TEST
select SERIAL_HAS_DRIVER
select SERIAL_SUPPORT_INTERRUPT
select SERIAL_SUPPORT_ASYNC
select RING_BUFFER if (UART_INTERRUPT_DRIVEN || UART_ASYNC_API)
3 changes: 0 additions & 3 deletions drivers/serial/serial_test.c
Expand Up @@ -21,9 +21,6 @@

LOG_MODULE_REGISTER(mock_serial, CONFIG_LOG_DEFAULT_LEVEL);

BUILD_ASSERT(!IS_ENABLED(CONFIG_UART_INTERRUPT_DRIVEN) || IS_ENABLED(CONFIG_RING_BUFFER));
BUILD_ASSERT(!IS_ENABLED(CONFIG_UART_ASYNC_API) || IS_ENABLED(CONFIG_RING_BUFFER));

#define DT_DRV_COMPAT vnd_serial
struct serial_vnd_data {
#ifdef CONFIG_RING_BUFFER
Expand Down

0 comments on commit fae3cdd

Please sign in to comment.