Verified Commit 8b6240f0 authored by Rahix's avatar Rahix
Browse files

fix(docs): Minor fixes in display docs


Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent c3bcca29
......@@ -22,9 +22,9 @@ Last but not least, if you want to start hacking the lower-level firmware, the
pycardium/overview
pycardium/color
pycardium/display
pycardium/leds
pycardium/vibra
pycardium/display
.. toctree::
:maxdepth: 1
......
......@@ -177,19 +177,19 @@ API(API_INTERRUPT_DISABLE, int epic_interrupt_disable(api_int_id_t int_id));
* =======
*/
/**
*
*/
/** Line-Style */
enum linestyle_t {
/** */
LINESTYLE_FULL = 0,
/** */
LINESTYLE_DOTTED = 1
};
/**
*
*/
/** Fill-Style */
enum fillstyle_t {
/** */
FILLSTYLE_EMPTY = 0,
/** */
FILLSTYLE_FILLED = 1
};
......@@ -197,7 +197,8 @@ enum fillstyle_t {
* Locks the display.
*
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API(API_DISP_OPEN, int epic_disp_open());
......@@ -205,7 +206,8 @@ API(API_DISP_OPEN, int epic_disp_open());
* Unlocks the display again.
*
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API(API_DISP_CLOSE, int epic_disp_close());
......@@ -224,7 +226,8 @@ API(API_DISP_UPDATE, int epic_disp_update());
* :param fg: foreground color in rgb565
* :param bg: background color in rgb565
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API(API_DISP_PRINT,
int epic_disp_print(
......@@ -240,7 +243,8 @@ API(API_DISP_PRINT,
*
* :param color: fill color in rgb565
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API(API_DISP_CLEAR, int epic_disp_clear(uint16_t color));
......@@ -255,7 +259,8 @@ API(API_DISP_CLEAR, int epic_disp_clear(uint16_t color));
* :param linestyle: 0 for solid, 1 for dottet (almost no visual difference)
* :param pixelsize: thickness of the line; 1 <= pixelsize <= 8
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API(API_DISP_LINE,
int epic_disp_line(
......@@ -279,7 +284,8 @@ API(API_DISP_LINE,
* :param fillstyle: 0 for empty, 1 for filled
* :param pixelsize: thickness of the rectangle outline; 1 <= pixelsize <= 8
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API(API_DISP_RECT,
int epic_disp_rect(
......@@ -302,7 +308,8 @@ API(API_DISP_RECT,
* :param fillstyle: 0 for empty, 1 for filled
* :param pixelsize: thickness of the circle outline; 1 <= pixelsize <= 8
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API(API_DISP_CIRC,
int epic_disp_circ(
......
......@@ -7,9 +7,9 @@ class Display:
in card10 to be used in a safe way. All draw methods return
the display object so that it is possible to chain calls.
It is recommended to use a context manager as following:
.. code-block:: python
import display
with display.open() as disp:
disp.clear().update()
......@@ -57,7 +57,7 @@ class Display:
def print(self, text, *, fg=None, bg=None, posx=0, posy=0):
"""
Prints a string on the display. Font size is locked to 20px
:param text: Text to print
:param fg: Foreground color (expects RGB triple)
:param bg: Background color (expects RGB triple)
......@@ -80,8 +80,8 @@ class Display:
:param ye: Y end coordinate, 0 <= ye <= 80
:param col: color of the line (expects RGB triple)
:param dotted: whether the line should be dotted or not
(questionable implementation: draws every other pixel white, draws
white squares at higher pixel sizes)
(questionable implementation: draws every other pixel white, draws
white squares at higher pixel sizes)
:param size: size of the individual pixels, ranges from 1 to 8
"""
......@@ -111,7 +111,7 @@ class Display:
def circ(self, x, y, rad, *, col=None, filled=True, size=1):
"""
Draws a circle on the display.
:param x: center x coordinate, 0 <= x <= 160
:param y: center y coordinate, 0 <= y <= 80
:param rad: radius
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment