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

Allow Selection of _bleio by Board, Fixup CIRCUITPY_BLEIO Flags #9878

Open
wants to merge 5 commits into
base: 9.2.x
Choose a base branch
from

Conversation

eightycc
Copy link
Collaborator

@eightycc eightycc commented Dec 7, 2024

Allows selection of _bleio impementation by board within a port. Makes explicit HCI device inclusion by replacing use of vpath.

Changes meanings of CIRCUITPY_BLEIO* flags as follows:

  • CIRCUITPY_BLEIO: Any _bleio implementation is part of this build. Automatically set.
  • CIRCUITPY_BLEIO_NATIVE: Selects the port's native _bleio implementation.
  • CIRCUITPY_BLEIO_HCI: Selects the serial HCI implementation.

@eightycc
Copy link
Collaborator Author

eightycc commented Dec 7, 2024

Marked as work in progress. Using CI to verify correct builds for all ports/boards.

@dhalbert
Copy link
Collaborator

dhalbert commented Mar 28, 2025

@eightycc I was going to do this and then saw you already did! It just needs a merge conflict fixed.

I would also like to get the Module Support Matrix to include an annotation that describes which _bleio is actually supported. This PR will make that easier: we can add entries to ADDITIONAL_MODULES in docs/shared_bindings_matrix.py like:

    "_bleio (native)": "CIRCUITPY_BLEIO_NATIVE",
    "_bleio (HCI co-processor)": "CIRCUITPY_BLEIO_HCI",

I also had another thought, which I'm not sure is a good idea at all, but is an idea. Asking @tannewt also:

Suppose _bleio for HCI was actually called _bleio_hci. The libraries would do something like:

try:
    import _bleio
except ImportError
    import _bleio_hci as _bleio

Conceivably, one could make a build that would support both, though it's not of much use (though there are compile issues about that, so you don't have to duplicate the shared-bindings code).

@eightycc
Copy link
Collaborator Author

Like Barliman Butterbur in LOTR, I completely forgot about this one. One thing drives out another! I'll pick it up again, if you'd like.

@eightycc eightycc changed the base branch from main to 9.2.x March 31, 2025 12:54
@eightycc eightycc marked this pull request as ready for review March 31, 2025 13:58
@eightycc eightycc requested a review from dhalbert March 31, 2025 13:59
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