Skip to content

Driver naming conventions #14

@sfe-SparkFro

Description

@sfe-SparkFro

#7 (comment) from @gigapod in #7 in reference to the initial ST7789 display driver:

More descriptive class name - something that indicates what this does. Same with the file name for this driver.

Maybe DriverST7799 and driver_st7799 .. or something like that .. more thought on this needed.

FYI 7e30426 combines both classes into a single ST7789_SPI class. Though after writing my comments below, I'm thinking I shouldn't have done that, and instead keep the base ST7789 class...

I think for the topic of driver naming conventions, I'd like to consider how other drivers may be implemented, and determine a standardized naming convention from there. This applies to both display and camera drivers.

I started with the ST7789 because it's so popular, and SPI because it's very platform agnostic. But other displays (eg. ILI9341) and other interfaces (eg. ESP32 I80, RP2 PIO or HSTX, etc.) could be used. So IMO both should be part of the class name.

Another thought - Should we have base interface classes for the display and camera? At minimum, the base display class needs imshow(), but could also contain helper methods like I created in 7e30426 so those don't need to be duplicated. I haven't started working on camera drivers yet, but probably similarly needs a read() method and other helper methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions