Rework Kconfig to improve handling of multiple UART instances by using Kconfig template file. Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
78 lines
2.6 KiB
Plaintext
78 lines
2.6 KiB
Plaintext
#nRF UART(E) instance configuration
|
|
|
|
# Copyright (c) 2023 Nordic Semiconductor ASA
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config UART_$(nrfx_uart_num)_INTERRUPT_DRIVEN
|
|
bool "Interrupt support on port $(nrfx_uart_num)"
|
|
depends on UART_INTERRUPT_DRIVEN
|
|
default y
|
|
help
|
|
This option enables UART interrupt support on port $(nrfx_uart_num).
|
|
|
|
config UART_$(nrfx_uart_num)_ASYNC
|
|
bool "Asynchronous API support on port $(nrfx_uart_num)"
|
|
depends on UART_ASYNC_API && !UART_$(nrfx_uart_num)_INTERRUPT_DRIVEN
|
|
default y
|
|
help
|
|
This option enables UART Asynchronous API support on port $(nrfx_uart_num).
|
|
|
|
config UART_$(nrfx_uart_num)_ENHANCED_POLL_OUT
|
|
bool "Efficient poll out on port $(nrfx_uart_num)"
|
|
default y
|
|
depends on HAS_HW_NRF_UARTE$(nrfx_uart_num)
|
|
select NRFX_PPI if HAS_HW_NRF_PPI
|
|
select NRFX_DPPI if HAS_HW_NRF_DPPIC
|
|
help
|
|
When enabled, polling out does not trigger interrupt which stops TX.
|
|
Feature uses a PPI channel.
|
|
|
|
config UART_$(nrfx_uart_num)_NRF_PARITY_BIT
|
|
bool "Parity bit"
|
|
help
|
|
Enable parity bit.
|
|
|
|
config UART_$(nrfx_uart_num)_NRF_TX_BUFFER_SIZE
|
|
int "Size of RAM buffer"
|
|
depends on UART_INTERRUPT_DRIVEN
|
|
range 1 65535
|
|
default 32
|
|
help
|
|
Size of the transmit buffer for API function: fifo_fill.
|
|
This value is limited by range of TXD.MAXCNT register for
|
|
particular SoC.
|
|
|
|
config UART_$(nrfx_uart_num)_NRF_HW_ASYNC
|
|
bool "Use hardware RX byte counting"
|
|
depends on HAS_HW_NRF_UARTE$(nrfx_uart_num)
|
|
depends on UART_ASYNC_API
|
|
select NRFX_PPI if HAS_HW_NRF_PPI
|
|
select NRFX_DPPI if HAS_HW_NRF_DPPIC
|
|
help
|
|
If default driver uses interrupts to count incoming bytes, it is possible
|
|
that with higher speeds and/or high cpu load some data can be lost.
|
|
It is recommended to use hardware byte counting in such scenarios.
|
|
Hardware RX byte counting requires timer instance and one PPI channel.
|
|
|
|
config UART_$(nrfx_uart_num)_NRF_ASYNC_LOW_POWER
|
|
bool "Low power mode"
|
|
depends on HAS_HW_NRF_UARTE$(nrfx_uart_num)
|
|
depends on UART_ASYNC_API
|
|
help
|
|
When enabled, UARTE is enabled before each TX or RX usage and disabled
|
|
when not used. Disabling UARTE while in idle allows to achieve lowest
|
|
power consumption. It is only feasible if receiver is not always on.
|
|
|
|
config UART_$(nrfx_uart_num)_NRF_HW_ASYNC_TIMER
|
|
int "Timer instance"
|
|
depends on UART_$(nrfx_uart_num)_NRF_HW_ASYNC
|
|
|
|
config UART_$(nrfx_uart_num)_GPIO_MANAGEMENT
|
|
bool "GPIO management on port $(nrfx_uart_num)"
|
|
depends on PM_DEVICE
|
|
default y
|
|
help
|
|
If enabled, the driver will configure the GPIOs used by the uart to
|
|
their default configuration when device is powered down. The GPIOs
|
|
will be configured back to correct state when UART is powered up.
|