Few doubts in gd2-lib codebase
Closed this issue · 1 comments
In the code at the link https://github.com/jamesbowman/gd2-lib/blob/master/contrib/circular.ino#L12
when will setup() be called ?
The setup() is using w and h, which is set by a function rd16(REG_HSIZE) and rd16(REG_VSIZE) respectively, but the rd16() always return 0xFF. Would like to know the purpose of this function.
It would be helpful if there is any user guide (step by step guide) for this file ?
It's an Arduino sketch, not a regular C program, so setup() is called at startup and loop() is called every cycle.
(w, h) is the dimensions of the display in pixels. rd16(REG_HSIZE)
returns 480 on a standard Gameduino. rd16(REG_VSIZE)
returns 272.
There is a writeup of the maths behind this file here
http://www.excamera.com/sphinx/article-circular.html
and a reference on the GD library here http://www.excamera.com/files/gd2book_v0.pdf