Add some features to the external app development kit, including some C++ sample-app features missing in the rust one.
Colors
Create colors with new, from_rgb888 and from_hsv to convert from usual color systems to rgb565. Use const fn to make functions usable in const contexts.
Add some pure colors constants.
Display
Add screen width and height constants.
Create Rect with new and a SCREEN (full screen rect) constant.
Point struct with new and a ZERO (top left corner) constant.
Implement draw_string using string slice to pointer conversion.
Keyboard
Implementing scan which return a wrapper State around an u64.
This State type can query the internal state through the key_down method.
Create the key mod containing key codes.
Panic handler
Fill the screen in red with a message : "Error !" in top left.
Add some features to the external app development kit, including some C++ sample-app features missing in the rust one.
Colors
Create colors with
new
,from_rgb888
andfrom_hsv
to convert from usual color systems to rgb565. Useconst fn
to make functions usable in const contexts. Add some pure colors constants.Display
Add screen width and height constants. Create Rect with
new
and a SCREEN (full screen rect) constant. Point struct withnew
and a ZERO (top left corner) constant. Implementdraw_string
using string slice to pointer conversion.Keyboard
Implementing
scan
which return a wrapper State around an u64. This State type can query the internal state through thekey_down
method. Create thekey
mod containing key codes.Panic handler
Fill the screen in red with a message : "Error !" in top left.