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

make include hierarchy consistent with expected usage #21974

Closed
pabigot opened this issue Jan 16, 2020 · 3 comments · Fixed by #21978
Closed

make include hierarchy consistent with expected usage #21974

pabigot opened this issue Jan 16, 2020 · 3 comments · Fixed by #21978
Labels
Enhancement Changes/Updates/Additions to existing features

Comments

@pabigot
Copy link
Collaborator

pabigot commented Jan 16, 2020

In response to a review comment I proposed #21776 which removed the implicit addition of ${ZEPHYR_BASE}/include/drivers from the default include path, so that <drivers/sensor.h> would be enforced. This breaks bluetooth, which wants to use <bluetooth/whatever.h> but the location is ${ZEPHYR_BASE}/include/drivers/bluetooth.

It would be nice if the two were consistent, which probably means bluetooth should move up one level.

@pabigot pabigot added the Enhancement Changes/Updates/Additions to existing features label Jan 16, 2020
@SebastianBoe
Copy link
Collaborator

FYI: @jhedberg , @joerchan , @cvinayak

@joerchan
Copy link
Contributor

In include/drivers/bluetooth there is only hci_driver.h. Most HCI drivers are implemented in Zephyr itself. So only out-of-tree HCI drivers would be affected by this.

I don't mind switching to drivers/bluetooth/hci_driver.h to make in consistent. It would require updating our downstream HCI driver but shouldn't pose any big issues.
I`m currently not aware of any other maintaining their hci driver out-of-tree though.

@aescolar Any comments?

@joerchan
Copy link
Contributor

Actually it appears both paths are used. And our downstream use drivers/bluetooth/hci_driver.h so only zephyr HCI drivers are affected (that I'm aware of).

carlescufi added a commit to carlescufi/zephyr that referenced this issue Jan 16, 2020
The path to include/drivers should not be in the compiler include path
list, only include/. In order to make this possible, always explictly
refer to hci_driver.h via the drivers/bluetooth/ path and not only
bluetooth/.

Fixes zephyrproject-rtos#21974.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
nashif pushed a commit that referenced this issue Jan 17, 2020
The path to include/drivers should not be in the compiler include path
list, only include/. In order to make this possible, always explictly
refer to hci_driver.h via the drivers/bluetooth/ path and not only
bluetooth/.

Fixes #21974.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants