zephyr/drivers
Andrzej Głąbek 7e050b4bd3 drivers: uart_nrfx_uarte: Fix implementation of uart_irq_tx_ready()
Although it is not clearly specified in the UART API, this function
is supposed to return 0 when the TX interrupt is disabled, regardless
of whether anything could fit into the TX buffer or not (this can be
concluded from looking at implementations of several samples and tests
present in the tree, also almost all UART drivers are implemented this
way).

The problem in the uart_nrfx_uarte driver case is that the flag that
allows generation of the TX interrupt is not cleared directly in the
uart_irq_tx_disable() function but this clearing is deferred to the
end of the current transmission, in case one is in progress, and hence
it is done in the interrupt handler. Consequently, when the interrupt
handler is not entered between calls to uart_irq_tx_disable() and
uart_irq_tx_ready() (e.g. when both functions are called in a loop
executed in the interrupt context), the latter may return an invalid
value.

Fix this problem by additionally checking if the TX interrupt was
requested to be disabled, not only if it is already disabled in
hardware.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-04-23 18:24:07 +02:00
..
adc drivers: adc: adc_sam_afec: rework device tree support 2020-04-23 06:11:26 -05:00
audio drivers: audio: mpxxdtyy: Conver to use DT_ANY_INST_ON_BUS macro 2020-04-18 08:43:02 -05:00
bluetooth drivers: bluetooth: rpmsg_nrf53: use new DT API 2020-04-18 07:52:05 -05:00
can drivers: can: shell: add command for configuring a CAN controller 2020-04-21 18:26:16 +02:00
clock_control
console
counter drivers: counter: nrf: use new DT API 2020-04-17 18:28:55 +02:00
crypto
dac drivers: dac: Add support for STM32L0 series 2020-04-20 17:41:48 +02:00
debug
display drivers: display: mb_display: Convert to DT_LABEL() macro 2020-04-17 17:22:53 +02:00
dma
eeprom
entropy
espi driver: espi: Re-enable bus interrupts after espi reset. 2020-04-23 18:22:49 +02:00
ethernet drivers: ethernet: eth_mcux: Convert to using DT_INST macros 2020-04-23 07:40:37 -05:00
flash drivers: flash: nordic qspi: finish DT API conversion 2020-04-21 18:31:08 +02:00
gpio drivers: gpio: gpio_sam: Convert to DT_INST 2020-04-23 05:59:50 -05:00
hwinfo drivers: hwinfo: update mcux-sim implementation byte order 2020-04-22 17:31:56 +02:00
i2c drivers: i2c: i2c_sam_twihs: rework device tree support 2020-04-21 15:46:30 -05:00
i2s include/devicetree: dma: rename DMAS CELL macros 2020-04-21 06:37:28 -05:00
ieee802154
interrupt_controller drivers: intc: intc_cavs: Convert to DT_INST 2020-04-22 04:59:22 -05:00
ipm intc: intc_cavs: Replace DT_CAVS_ICTL_BASE_ADDR with new macros 2020-04-22 04:59:22 -05:00
kscan
led
led_strip
lora
modem drivers: modem: ublox-sara-r4: implemented sendmsg 2020-04-21 17:37:08 +03:00
net
neural_net
pcie
peci
pinmux drivers: pinmux: stm32l4: Add extra pins for I2C1 2020-04-22 17:39:12 +02:00
ps2
ptp_clock
pwm drivers: pwm: pwm_mcux: Convert driver to new DT_INST macros 2020-04-20 11:08:46 -05:00
sensor sensor: si7006: combined RH/T measurements 2020-04-22 15:51:15 -05:00
serial drivers: uart_nrfx_uarte: Fix implementation of uart_irq_tx_ready() 2020-04-23 18:24:07 +02:00
spi drivers: spi: sifive: Fix bug with checking if tx fifo is full 2020-04-23 17:28:48 +02:00
timer drivers: timer: nrf_rtc: Refactor alarm setting 2020-04-22 17:45:07 +02:00
usb drivers: usb: usb_dc_sam: Convert to DT_INST macros 2020-04-23 06:10:07 -05:00
video drivers: video: mcux_csi: Convert driver to DT_INST macro 2020-04-20 11:08:46 -05:00
watchdog
wifi
CMakeLists.txt drivers: dac: Add API for DAC peripherals 2020-04-20 17:41:48 +02:00
Kconfig drivers: dac: Add API for DAC peripherals 2020-04-20 17:41:48 +02:00