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

samples: bluetooth: hci_uart: Improve TX path #27917

Merged

Conversation

nordic-krch
Copy link
Contributor

@nordic-krch nordic-krch commented Sep 1, 2020

Improved TX path to use uart_fifo_fill instead of uart_poll_out

PR takes TX part from #27581 with a bit of rework. It is using very similar approach as in h4.c.

Fixes #2955

Signed-off-by: Krzysztof Chruscinski krzysztof.chruscinski@nordicsemi.no

Copy link
Member

@carlescufi carlescufi left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me, thank you for implementing this

@carlescufi
Copy link
Member

I also tested this with BlueZ without any issues.

@nordic-krch
Copy link
Contributor Author

my test setup consist of two nrf52 boards, one hci_uart and second peripheral_hr and controller off.

Copy link
Contributor

@joerchan joerchan left a comment

Choose a reason for hiding this comment

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

LGMT, please consider using suggested pointer check for consistency.

static struct net_buf *buf;
int len;

if (buf == NULL) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Usually check with !buf (same below).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Improved TX path to use uart_fifo_fill instead of uart_poll_out

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use interrupt-driven TX in hci_uart sample
4 participants