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 vairous issues found in bt uart shim driver #2611

Merged
merged 6 commits into from
Dec 28, 2020

Conversation

xiaoxiang781216
Copy link
Contributor

Summary

bt_uart_shim: Correct the prototype of bt_uart_shim_getdevice
bt_uart_shim: Support the multiple instances
bt_uart_shim: Don't hardcode the thread stack size
bt_uart_shim: Remove g_lowerstatic static variable
bt_uart_shim: Make CONFIG_SERIAL_TERMIOS optional
bt_uart_shim: Setup pollfd with file* correctly

Impact

Testing

Please ignore nxstyle warning which is fixed by: #2607

@jerpelea
Copy link
Contributor

@xiaoxiang781216
Error: /home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/include/nuttx/wireless/bluetooth/bt_uart_shim.h:9:78: error: Long line found
Error: /home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/include/nuttx/wireless/bluetooth/bt_uart_shim.h:14:79: error: Long line found
Error: /home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/include/nuttx/wireless/bluetooth/bt_uart_shim.h:15:79: error: Long line found
Error: /home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/include/nuttx/wireless/bluetooth/bt_uart_shim.h:19:79: error: Long line found
Error: /home/runner/work/incubator-nuttx/incubator-nuttx/nuttx/include/nuttx/wireless/bluetooth/bt_uart_shim.h:22:78: error: Long line found

@xiaoxiang781216
Copy link
Contributor Author

@jerpelea fixed here: #2607

1.Add const to the path argument
2.Return the explicit type(struct btuart_lowerhalf_s *)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
by removing the global variables(g_n)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
so let's change 1024 to CONFIG_DEFAULT_TASKSIZE

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
let's initialize the callback directly to save the memory

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
since the caller don't always need to use setbaud callback

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
@xiaoxiang781216
Copy link
Contributor Author

@jerpelea thanks, PR pass CI now.

@jerpelea jerpelea self-requested a review December 28, 2020 09:38
@jerpelea jerpelea merged commit c612c06 into apache:master Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants