TinyCircuits / TinyCircuits-Thumby-Code-Editor

https://code.thumby.us/
GNU General Public License v3.0
30 stars 20 forks source link

API: Rename display on/off #60

Open ace-dent opened 1 year ago

ace-dent commented 1 year ago

The SSD1306 poweroff (here) and poweron (here) - have misleading names. The commands simply switch the display on and off, while the SSD1306 OLED module still draws power.

Suggest renaming to: sleep() and wake(). In future, we might add the feature of poweroff which would additionally switch off the charge pump, etc. and minimise power use. To recover from this 'off' state, it would be necessary to init the display again.

This may break the API, but I don't think anyone is using this and it's not accessible directly through thumby.display...?