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

Automatically materialize USB and CAN mixins for compatibility #283

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

ducky64
Copy link
Collaborator

@ducky64 ducky64 commented Aug 16, 2023

Legacy code had CAN and USB on all IoControllers, but mixins changed that (because USB and CAN are not universal peripherals) which was a breaking change. This automatically materializes the USB and CAN mixins when requested using legacy-style code, by overloading __getattr__(...). This should also correctly encode the requirement for mixins as part of the block type.

Likely examples and tutorials will continue using the old-style (non-mixin) USB syntax for simplicity.

@ducky64 ducky64 changed the title Make USB part of the base MCU interface Make USB part of the base MCU interface again Aug 16, 2023
@ducky64 ducky64 changed the title Make USB part of the base MCU interface again Make USB part of the base IoController interface again Aug 16, 2023
@ducky64 ducky64 closed this Aug 16, 2023
@ducky64 ducky64 reopened this Aug 16, 2023
@ducky64 ducky64 changed the title Make USB part of the base IoController interface again Automatically materialize USB and CAN mixins for compatibility Aug 16, 2023
@ducky64 ducky64 merged commit 5f42b68 into master Aug 16, 2023
18 checks passed
@ducky64 ducky64 deleted the no-usb-mixin branch August 16, 2023 22:41
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.

1 participant