Skip to content
Snippets Groups Projects
Commit bbd61fde authored by dx's avatar dx
Browse files

docs: use more autodocs, add more methods to hardware.pyi

And remove a password from badge_link.pyi
parent 1a316907
No related branches found
No related tags found
No related merge requests found
.. py:module:: badge_link
``badge_link`` module
=====================
Functions that take a :code:`pin_mask` take a combination of constants from
:code:`badge_link.PIN_MASK_LINE_{IN/OUT}_{TIP/RING}`
The GPIO indices to be used with :code:`machine.UART` are listed in
:code:`badge_link.PIN_INDEX_LINE_{OUT/IN}_{TIP/RING}`.
Functions
---------
.. py:function:: get_active(pin_mask : int) -> int
Gets active badge link ports. Returns a pin mask.
.. py:function:: enable(pin_mask : int) -> int
Enables badge link ports.
Returns the output of :code:`badge_link.get_active()` after execution.
Do NOT connect headphones to a badge link port. You might hear a ringing for
a while. Warn user.
.. py:function:: disable(pin_mask : int) -> int
Disables badge link ports.
Returns the output of spio_badge_link_get_active after execution.
Pin masks
---------
.. py:data:: PIN_MASK_LINE_IN_TIP
:type: int
.. py:data:: PIN_MASK_LINE_IN_RING
:type: int
.. py:data:: PIN_MASK_LINE_OUT_TIP
:type: int
.. py:data:: PIN_MASK_LINE_OUT_RING
:type: int
.. py:data:: PIN_MASK_LINE_IN
:type: int
.. py:data:: PIN_MASK_LINE_OUT
:type: int
.. py:data:: PIN_MASK_ALL
:type: int
Pin indices
-----------
These values may vary across prototype revisions.
.. py:data:: PIN_INDEX_LINE_IN_TIP
:type: int
.. py:data:: PIN_INDEX_LINE_IN_RING
:type: int
.. py:data:: PIN_INDEX_LINE_OUT_TIP
:type: int
.. py:data:: PIN_INDEX_LINE_OUT_RING
:type: int
.. automodule:: badge_link
:members:
:undoc-members:
.. py:module:: ctx
``ctx`` module
==============
.. py:class:: Context
.. py:method:: line_to
.. py:method:: move_to
.. py:method:: curve_to
.. py:method:: quad_to
.. py:method:: rel_line_to
.. py:method:: rel_move_to
.. py:method:: rel_curve_to
.. py:method:: rel_quad_to
.. py:method:: rectangle
.. py:method:: arc
.. py:method:: arc_to
.. py:method:: rel_arc_to
.. py:method:: round_rectangle
.. py:method:: begin_path
.. py:method:: close_path
.. py:method:: in_fill
.. py:method:: fill
.. py:method:: stroke
.. py:method:: paint
.. py:method:: clip
.. py:method:: text
.. py:method:: text_width
.. py:method:: rotate
.. py:method:: scale
.. py:method:: translate
.. py:method:: apply_transform
.. py:method:: start_group
.. py:method:: end_group
.. py:method:: preserve
.. py:method:: linear_gradient
.. py:method:: radial_gradient
.. py:method:: add_stop
.. py:method:: line_dash
.. py:method:: texture
.. py:method:: save
.. py:method:: restore
.. py:method:: start_frame
.. py:method:: end_frame
.. py:method:: get_font_name
.. py:method:: gray
.. py:method:: rgb
.. py:method:: rgba
.. py:method:: tinyvg_draw
.. py:method:: tinyvg_get_size
.. py:method:: logo
Attributes
----------
.. py:attribute:: x
.. py:attribute:: y
.. py:attribute:: width
.. py:attribute:: height
.. py:attribute:: font
.. py:attribute:: image_smoothing
.. py:attribute:: compositing_mode
.. py:attribute:: blend_mode
.. py:attribute:: flags
.. py:attribute:: line_cap
.. py:attribute:: line_join
.. py:attribute:: text_align
.. py:attribute:: fill_rule
.. py:attribute:: text_baseline
.. py:attribute:: line_width
.. py:attribute:: line_dash_offset
.. py:attribute:: line_height
.. py:attribute:: wrap_left
.. py:attribute:: wrap_right
.. py:attribute:: miter_limit
.. py:attribute:: global_alpha
.. py:attribute:: font_size
Flag constants
--------------
.. py:data:: LOWFI
.. py:data:: GRAY2
.. py:data:: GRAY4
.. py:data:: GRAY8
.. py:data:: RGB332
.. py:data:: HASH_CACHE
.. py:data:: KEEP_DATA
.. py:data:: INTRA_UPDATE
.. py:data:: STAY_LOW
Fill rule constants
-------------------
.. py:data:: WINDING
.. py:data:: EVEN_ODD
Join constants
--------------
.. py:data:: BEVEL
.. py:data:: ROUND
.. py:data:: MITER
Cap constants
-------------
.. py:data:: NONE
.. py:data:: ROUND
.. py:data:: SQUARE
Composite constants
-------------------
.. py:data:: SOURCE_OVER
.. py:data:: COPY
.. py:data:: SOURCE_IN
.. py:data:: SOURCE_OUT
.. py:data:: SOURCE_ATOP
.. py:data:: CLEAR
.. py:data:: DESTINATION_OVER
.. py:data:: DESTINATION
.. py:data:: DESTINATION_IN
.. py:data:: DESTINATION_OUT
.. py:data:: DESTINATION_ATOP
.. py:data:: XOR
Blend constants
---------------
.. py:data:: NORMAL
.. py:data:: MULTIPLY
.. py:data:: SCREEN
.. py:data:: OVERLAY
.. py:data:: DARKEN
.. py:data:: LIGHTEN
.. py:data:: COLOR_DODGE
.. py:data:: COLOR_BURN
.. py:data:: HARD_LIGHT
.. py:data:: SOFT_LIGHT
.. py:data:: DIFFERENCE
.. py:data:: EXCLUSION
.. py:data:: HUE
.. py:data:: SATURATION
.. py:data:: COLOR
.. py:data:: LUMINOSITY
.. py:data:: DIVIDE
.. py:data:: ADDITION
.. py:data:: SUBTRACT
Text baseline constants
-----------------------
.. py:data:: ALPHABETIC
.. py:data:: TOP
.. py:data:: HANGING
.. py:data:: MIDDLE
.. py:data:: IDEOGRAPHIC
.. py:data:: BOTTOM
Text alignment constants
------------------------
.. py:data:: START
.. py:data:: END
.. py:data:: CENTER
.. py:data:: LEFT
.. py:data:: RIGHT
Format constants
----------------
.. py:data:: GRAY8
.. py:data:: GRAYA8
.. py:data:: RGB8
.. py:data:: RGBA8
.. py:data:: BGRA8
.. py:data:: RGB565
.. py:data:: RGB565_BYTESWAPPED
.. py:data:: RGB332
.. py:data:: GRAY1
.. py:data:: GRAY2
.. py:data:: GRAY4
.. py:data:: YUV420
Other constants
---------------
.. py:data:: PRESS
.. py:data:: MOTION
.. py:data:: RELEASE
.. py:data:: ENTER
.. py:data:: LEAVE
.. py:data:: TAP
.. py:data:: TAP_AND_HOLD
.. py:data:: DRAG_PRESS
.. py:data:: DRAG_MOTION
.. py:data:: DRAG_RELEASE
.. py:data:: KEY_PRESS
.. py:data:: KEY_DOWN
.. py:data:: KEY_UP
.. py:data:: SCROLL
.. py:data:: MESSAGE
.. py:data:: DROP
.. py:data:: SET_CURSOR
Formats
-------
.. py:data::
.. py:data:: GRAY8
.. py:data:: GRAYA8
.. py:data:: RGB8
.. py:data:: RGBA8
.. py:data:: BGRA8
.. py:data:: RGB565
.. py:data:: RGB565_BYTESWAPPED
.. py:data:: RGB332
.. py:data:: GRAY1
.. py:data:: GRAY2
.. py:data:: GRAY4
.. py:data:: YUV420
Flags
-----
.. py:data:: LOWFI
.. py:data:: GRAY2
.. py:data:: GRAY4
.. py:data:: GRAY8
.. py:data:: RGB332
.. py:data:: HASH_CACHE
.. py:data:: KEEP_DATA
.. py:data:: INTRA_UPDATE
.. py:data:: STAY_LOW
.. automodule:: st4m.ui.ctx
:members:
:undoc-members:
.. py:module:: hardware
``hardware`` module
====================
.. py:function:: init_done
.. py:function:: captouch_calibration_active
.. py:function:: get_captouch
.. py:function:: captouch_get_petal_pad_raw
.. py:function:: captouch_get_petal_pad
.. py:function:: captouch_get_petal_rad
.. py:function:: captouch_get_petal_phi
.. py:function:: captouch_set_petal_pad_threshold
.. py:function:: captouch_autocalib
.. py:function:: captouch_set_calibration_afe_target
.. py:function:: menu_button_get
.. py:function:: application_button_get
.. py:function:: left_button_get
.. py:function:: right_button_get
.. py:function:: menu_button_set_left
.. py:function:: menu_button_get_left
===================
.. py:function:: set_global_volume_dB
.. py:function:: count_sources
.. py:function:: dump_all_sources
.. py:function:: display_update
.. py:function:: freertos_sleep
.. py:function:: display_pipe_full
.. py:function:: display_pipe_flush
.. py:function:: display_set_backlight
.. py:function:: version
.. py:function:: get_ctx
.. automodule:: hardware
:members:
:undoc-members:
.. py:data:: BUTTON_PRESSED_LEFT
:type: int
.. py:data:: BUTTON_PRESSED_RIGHT
:type: int
.. py:data:: BUTTON_PRESSED_DOWN
:type: int
.. py:data:: BUTTON_NOT_PRESSED
:type: int
};
.. py:module:: kernel
``kernel`` module
=================
.. py:function:: scheduler_snapshot
.. py:function:: heap_stats
.. automodule:: kernel
:members:
:undoc-members:
.. py:data:: RUNNING
:type: int
.. py:data:: READY
:type: int
.. py:data:: BLOCKED
:type: int
.. py:data:: SUSPENDED
:type: int
.. py:data:: DELETED
:type: int
.. py:data:: INVALID
:type: int
......@@ -22,6 +22,7 @@ Welcome to flow3r's documentation!
api/audio.rst
api/badge_link.rst
api/captouch.rst
api/hardware.rst
api/kernel.rst
api/synth.rst
......
......@@ -136,4 +136,4 @@ class Jack(Protocol):
...
left: Jack
right: JackKhizqrU9ANxlu5sP
right: Jack
......@@ -5,9 +5,34 @@ from st4m.ui.ctx import Ctx
def freertos_sleep(ms: int) -> None: ...
def get_ctx() -> Ctx: ...
def display_pipe_full() -> bool: ...
def display_pipe_flush() -> None: ...
def display_update(c: Ctx) -> None: ...
def get_captouch(ix: int) -> bool: ...
def left_button_get() -> int: ...
def right_button_get() -> int: ...
def display_set_backlight() -> None: ...
def usb_connected() -> bool: ...
def usb_console_active() -> bool: ...
def version() -> None: ...
def i2c_scan() -> None: ...
def captouch_calibration_active() -> None: ...
def get_captouch() -> None: ...
def captouch_get_petal_pad_raw() -> None: ...
def captouch_get_petal_pad() -> None: ...
def captouch_get_petal_rad() -> None: ...
def captouch_get_petal_phi() -> None: ...
def captouch_set_petal_pad_threshold() -> None: ...
def captouch_autocalib() -> None: ...
def captouch_set_calibration_afe_target() -> None: ...
def menu_button_get() -> None: ...
def application_button_get() -> None: ...
def left_button_get() -> None: ...
def right_button_get() -> None: ...
def menu_button_set_left() -> None: ...
def menu_button_get_left() -> None: ...
def scope_draw() -> None: ...
BUTTON_PRESSED_LEFT : int
BUTTON_PRESSED_RIGHT : int
BUTTON_PRESSED_DOWN : int
BUTTON_NOT_PRESSED : int
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment