Skip to content

Commit

Permalink
stub in solution for M5Stack runs that require screen inversion #434
Browse files Browse the repository at this point in the history
  • Loading branch information
phoddie committed Aug 31, 2020
1 parent 70444c8 commit e9b1ea4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/devices/esp32/targets/m5stack/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$(MODDABLE)/modules/drivers/ili9341/manifest.json",
],
"config": {
"screen": "ili9341",
"screen": "m5stack/screen",
"rotation": 90,
"touch": "",
},
Expand Down Expand Up @@ -72,11 +72,13 @@
],
"pins/audioout": "$(MODULES)/pins/i2s/*",
"setup/target": "./setup-target",
"m5stack/screen": "./screen",
},
"preload": [
"monitor",
"pins/audioout",
"setup/target",
"m5stack/screen",
],
"resources": {
"*": "$(MODDABLE)/examples/assets/sounds/bflatmajor",
Expand Down
11 changes: 11 additions & 0 deletions build/devices/esp32/targets/m5stack/screen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import ILI9341 from "ili9341";
import Digital from "pins/digital";

export default class extends ILI9341 {
constructor(dictionary) {
super(dictionary);

if (false /* Digital.read(5) */)
super.command(0x21); // invert
}
}

0 comments on commit e9b1ea4

Please sign in to comment.