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 DCS command constructors const #91

Merged
merged 1 commit into from
Jan 19, 2024
Merged

Conversation

bdolgov
Copy link
Contributor

@bdolgov bdolgov commented Jan 19, 2024

This will allow to define lists of commands, for example, in per display initialisation sequences:

pub const ILI9488_INIT_SEQ: &[InitOp] = &[
    InitOp::Cmd(&dcs::SetInvertMode(mipidsi::ColorInversion::Inverted)),
    InitOp::Cmd(&dcs::SetAddressMode::new(
        mipidsi::ColorOrder::Bgr,
        mipidsi::Orientation::Landscape(false),
        mipidsi::RefreshOrder {
            vertical: mipidsi::VerticalRefreshOrder::TopToBottom,
            horizontal: mipidsi::HorizontalRefreshOrder::LeftToRight,
        },
    )),
    ...
];

@bdolgov bdolgov requested a review from almindor as a code owner January 19, 2024 12:34
Copy link
Collaborator

@rfuest rfuest left a comment

Choose a reason for hiding this comment

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

LGTM. The only thing that's missing is an entry in the changelog.

Copy link
Owner

@almindor almindor left a comment

Choose a reason for hiding this comment

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

LGTM too but please add the CHANGELOG entry

@bdolgov
Copy link
Contributor Author

bdolgov commented Jan 19, 2024

Updated the changelog and amended the change into the same commit, please take a look.

Thanks for the quick review!

@almindor almindor merged commit c969262 into almindor:master Jan 19, 2024
6 checks passed
@bdolgov bdolgov deleted the const-dcs branch January 19, 2024 17:32
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.

3 participants