Fordi / P2PPU

A NES-like Picture Processing Unit for the Pixel 2.0 by Rabid Prototypes
https://www.kickstarter.com/projects/rabidprototypes/pixel-20-the-arduino-compatible-smart-display
0 stars 0 forks source link

[Free-for-all] Generalize code for other microcontroller/Screen combinations. #3

Closed Fordi closed 7 years ago

Fordi commented 7 years ago

In making this, I needed to understand what the Adafruit_SSD1351 class was doing at a deep level, and to make certain it worked correctly for the Pixel 2.0. As a result, I ended up stripping out a lot of Preprocessor stuff and different behaviors for using native SPI versus bit-banged (though, really, bitbanging this is going to make you unhappy), and SAMD vs. AVR switches (I think there's still one in there). Additionally, it'd be really nice if it supported other OLED screens and other variants of the SSD1351 (I also removed the 96 pixel variant code; the fix would be in begin).

It shouldn't be hard to make true - at least I can test against a Teensy 2.0, 3.1 and 3.5 (I have those μCs) and against ST7735R screens (I have a couple laying around), and I intend to generalize for them. If anyone else wants to add a μC or screen, please implement the new device cleanly (replacing the original code) and create a pull request; I'll use the diff to figure out how to integrate the different code paths.

Note: If you're going to play in this space, please: each PR should contain one device addition; e.g., a different microcontroller or a different core board. For the first few screens, that means using Arduino Zero as your base board, as that's the most similar to a Pixel 2.0.

Fordi commented 7 years ago

By adding the PPUDriver interface and the example driver for the SSD1351, I've taken the first step towards this working.

Fordi commented 7 years ago

UcPPU_SSD1351 has been broken out into its own repository, and the interface is in μC PPU. I'm considering this closed, and will create new tickets for new OLED drivers and new μC types in the μC PPU repository.