Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SAM UART driver irq_update implementation #23279

Merged
merged 2 commits into from
Mar 10, 2020

Conversation

stephanosio
Copy link
Member

@stephanosio stephanosio commented Mar 5, 2020

The current irq_update UART API function implementation for the Atmel SAM family U(S)ART driver is not in compliance with the API documentation, which specifies that the function must always return 1.

This patch fixes the API implementation to unconditionally return 1.

Fixes #23278.

The `irq_update` UART API function must always return 1 according to
the API documentations.

This commit fixes the `irq_update` API function to unconditionally
return '1'.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The `irq_update` UART API function must always return 1 according to
the API documentations.

This commit fixes the `irq_update` API function to unconditionally
return `1`.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
@stephanosio stephanosio added area: Drivers area: UART Universal Asynchronous Receiver-Transmitter platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug labels Mar 5, 2020
Copy link
Collaborator

@pabigot pabigot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this has to be done given the documentation. IMO it would be better if uart_irq_update() returned -ENOTSUP if the feature was not available, and allowed any non-negative value to be returned for success so that useful information could be exposed to callers for diagnostic and platform-specific purposes.

If somebody's depending on this feature an API change to allow it may be appropriate.

@jhedberg jhedberg merged commit 95deb43 into zephyrproject-rtos:master Mar 10, 2020
@stephanosio stephanosio deleted the fix_sam_uart branch April 23, 2020 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Drivers area: UART Universal Asynchronous Receiver-Transmitter bug The issue is a bug, or the PR is fixing a bug platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uart_basic_api test fails for SAM family devices
4 participants