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

nimble/transport: Add common HCI RX task #1647

Merged

Conversation

andrzej-kaczmarek
Copy link
Contributor

This adds common task for implementing HCI RX. Any transport can simply
register its own function for RX that will be run in separate task
whenever triggered by dedicated API. This for example allows to easily
implement handling HCI RX in a task instead of in an interrupt since
handling RX in an interrupt doesn't work well with monitor enabled.

If selected transport doesn't register its function, all rx_task code
will be compiled out since there won't be any references to that code.

@andrzej-kaczmarek andrzej-kaczmarek force-pushed the transport-rx-task branch 7 times, most recently from caaa1cb to 23b9324 Compare October 26, 2023 12:11
nimble/transport/src/rx_task.c Fixed Show fixed Hide fixed
}

static void
rx_task_func(void *arg)

Check notice

Code scanning / CodeQL

Unused static function Note

Static function rx_task_func is unreachable
nimble/transport/src/rx_task.c Fixed Show fixed Hide fixed
@rymanluk
Copy link
Contributor

rymanluk commented Aug 1, 2024

is it still needed? @andrzej-kaczmarek

This adds common syscfg that is defined when monitor is used.
This adds common task for implementing HCI RX. Any transport can simply
register its own function for RX that will be run in separate task
whenever triggered by dedicated API. This for example allows to easily
implement handling HCI RX in a task instead of in an interrupt since
handling RX in an interrupt doesn't work well with monitor enabled.

If selected transport doesn't register its function, all rx_task code
will be compiled out since there won't be any references to that code.
This adds option to move RX from interrupt to task. This is enforced if
monitor is used since montor code cannot be used from interrupts.
@github-actions github-actions bot added the size/M Medium PR label Aug 9, 2024
@andrzej-kaczmarek andrzej-kaczmarek merged commit c6dc666 into apache:master Aug 9, 2024
18 checks passed
@andrzej-kaczmarek andrzej-kaczmarek deleted the transport-rx-task branch August 9, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Medium PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants