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

16 bit parallel mode incorrectly implemented #9

Closed
therealprof opened this issue May 18, 2020 · 7 comments
Closed

16 bit parallel mode incorrectly implemented #9

therealprof opened this issue May 18, 2020 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@therealprof
Copy link

The driver is currently using write_word to send associated command data, however this is implemented as

    // Writes a data word to the display.
    fn write_word(&mut self, value: u16) -> Result<(), Error<PinE>> {
        use display_interface::DataFormat::U16;
        self.di
            .send_data(U16(&[value.to_be()]))
            .map_err(|_| Error::DisplayError)
    }

which means it'll try to send data as 16 bit value, however the only display commands accepting 16 bit values are RAMWR and RAMWRC, i.e. the ones used to send pixel data. Everything else must be sent as multiple 8bit values, even in 16bit parallel mode.

@almindor almindor self-assigned this May 18, 2020
@almindor almindor added the bug Something isn't working label May 18, 2020
@almindor
Copy link
Owner

I might be wrong but I think this is actually OK. write_word is only used for RAMWR and CASET/RASET but those expect "16 bit" values too...

@therealprof
Copy link
Author

No, because they always need to be sent in two separate 8 bit values but if you specifiy a 16 bit Datasize, a 16 bit DI impl will not split it up but send it as a single 16 Bit value.

@therealprof
Copy link
Author

Screen Shot 2020-05-18 at 09 38 51

You can clearly see that the column D8-15 is empty and there're 4 rows with 8 bit transfers.

@almindor
Copy link
Owner

Ah yes you're right. I'll switch it to U8

@almindor
Copy link
Owner

Fixed

@therealprof
Copy link
Author

Can we get a release? ;)

@almindor
Copy link
Owner

We did, v0.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants