almindor / mipidsi

MIPI Display Serial Interface unified driver
MIT License
108 stars 47 forks source link

Add checks for display size and offset #131

Closed rfuest closed 2 months ago

rfuest commented 2 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.