3636#include "shared-module/framebufferio/FramebufferDisplay.h"
3737
3838//| class Framebuffer:
39- //| """A PicoDVI managed frame buffer."""
40- //|
4139//| def __init__(
4240//| self,
4341//| width: int,
5452//| color_depth: int = 8,
5553//| ) -> None:
5654//| """Create a Framebuffer object with the given dimensions. Memory is
57- //| allocated outside of onto the heap and then moved outside on VM
58- //| end.
55+ //| allocated outside of onto the heap and then moved outside on VM end.
56+ //|
57+ //| .. warning:: This will change the system clock speed to match the DVI signal.
58+ //| Make sure to initialize other objects after this one so they account
59+ //| for the changed clock.
5960//|
60- //| This will change the system clock speed to match the DVI signal.
61- //| Make sure to initialize other objects after this one so they account
62- //| for the changed clock. This also allocates a very large framebuffer
63- //| and is most likely to succeed the earlier it is attempted.
61+ //| This allocates a very large framebuffer and is most likely to succeed
62+ //| the earlier it is attempted.
6463//|
6564//| Each dp and dn pair of pins must be neighboring, such as 19 and 20.
6665//| They must also be ordered the same way. In other words, dp must be
8281//| `framebufferio.FramebufferDisplay`.
8382//|
8483//| :param int width: the width of the target display signal. Only 320, 400, 640 or 800 is currently supported depending on color_depth.
85- //| :param int height: the height of the target display signal. Only 240 or 480 is currently supported depenting on color_depth.
84+ //| :param int height: the height of the target display signal. Only 240 or 480 is currently supported depending on color_depth.
8685//| :param ~microcontroller.Pin clk_dp: the positive clock signal pin
8786//| :param ~microcontroller.Pin clk_dn: the negative clock signal pin
8887//| :param ~microcontroller.Pin red_dp: the positive red signal pin
@@ -160,8 +159,7 @@ static void check_for_deinit(picodvi_framebuffer_obj_t *self) {
160159}
161160
162161//| width: int
163- //| """The width of the framebuffer, in pixels. It may be doubled for output (and half of what
164- //| width was given to __init__.)"""
162+ //| """The width of the framebuffer, in pixels. It may be doubled for output."""
165163STATIC mp_obj_t picodvi_framebuffer_get_width (mp_obj_t self_in ) {
166164 picodvi_framebuffer_obj_t * self = (picodvi_framebuffer_obj_t * )self_in ;
167165 check_for_deinit (self );
@@ -172,8 +170,7 @@ MP_PROPERTY_GETTER(picodvi_framebuffer_width_obj,
172170 (mp_obj_t )& picodvi_framebuffer_get_width_obj );
173171
174172//| height: int
175- //| """The width of the framebuffer, in pixels. It may be doubled for output (and half of what
176- //| width was given to __init__.)"""
173+ //| """The width of the framebuffer, in pixels. It may be doubled for output."""
177174//|
178175STATIC mp_obj_t picodvi_framebuffer_get_height (mp_obj_t self_in ) {
179176 picodvi_framebuffer_obj_t * self = (picodvi_framebuffer_obj_t * )self_in ;
0 commit comments