almindor / mipidsi

MIPI Display Serial Interface unified driver
MIT License
125 stars 48 forks source link

Add checks for display size and offset #131

Closed rfuest closed 7 months ago

rfuest commented 7 months ago

This PR adds checks to init to make sure that the display size and offset are valid. I've used panics instead of adding a new InitError variant, because the check would only fail if the program contains a bug and the other InitErrors are runtime errors.