Skip to content

extmod/modbluetooth: Rename to "ubluetooth" #5247

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

Closed
wants to merge 2 commits into from

Conversation

jimmo
Copy link
Member

@jimmo jimmo commented Oct 22, 2019

Related to #4370 (equivalent change for array->uarray), and #5241 (weak links by default).

This should be a no-op for most users, but allows customisation.

extern const struct _mp_obj_module_t mp_module_onewire;

#if MICROPY_PY_BLUETOOTH
#define BLUETOOTH_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR_bluetooth), MP_ROM_PTR(&mp_module_bluetooth) },
#define BLUETOOTH_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR_ubluetooth), MP_ROM_PTR(&mp_module_ubluetooth) },
#else
#define BLUETOOTH_BUILTIN_MODULE
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this stuff should be moved to py/objmodule.c, next to all the other extmod modules that are included if their config value is enabled?

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems reasonable. Done!

jimmo added 2 commits October 22, 2019 17:37
For consistency with "umachine". Now that weak links are enabled
by default for built-in modules, this should be a no-op, but allows
extension of the bluetooth module by user code.

Also move registration of ubluetooth to objmodule rather than
port-specific.
@dpgeorge
Copy link
Member

Thank you, merged in b02d7e6 and 19e8774

@dpgeorge dpgeorge closed this Oct 22, 2019
@dpgeorge dpgeorge added the extmod Relates to extmod/ directory in source label Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extmod Relates to extmod/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants