Skip to content

minor write() optimization #94

Open
@Pachelbel1414

Description

@Pachelbel1414

Consider that you will often write data bytes without a command byte, but will almost never write a command byte without data bytes. For example, after setting up the display and issuing commands to set the write window and ram write mode, an application might then simply start continuously writing frames. Or even internally, look at the fill_rectangle() command.

As an optimization, consider leaving self.dc_pin.value = 1 as the default state, and only changing it to 0 and then back to 1 when ever a command byte is being written.

I believe the changes for this would trivial and isolated to the write() and read() methods. And to be extra safe, possibly setting it to 1 at the end of init().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions