diff --git a/docs/api/audio.rst b/docs/api/audio.rst index 1d2feafe6e5b0493ddf58f2895a851e38136a1d1..c7e87072b28382a9205a4ae44c98f59bf5a2d4a5 100644 --- a/docs/api/audio.rst +++ b/docs/api/audio.rst @@ -39,3 +39,33 @@ there may be a transient volume "hiccup". "p1" badges only use software volume. The unspecified variant automatically chooses the adequate channel (**). + +.. py:function:: headphones_adjust_volume_dB +.. py:function:: speaker_adjust_volume_dB +.. py:function:: adjust_volume_dB + +.. py:function:: headphones_get_volume_dB +.. py:function:: speaker_get_volume_dB +.. py:function:: get_volume_dB + +.. py:function:: headphones_get_mute +.. py:function:: speaker_get_mute +.. py:function:: get_mute + +.. py:function:: headphones_set_mute +.. py:function:: speaker_set_mute +.. py:function:: set_mute + +.. py:function:: headphones_set_minimum_volume_dB +.. py:function:: speaker_set_minimum_volume_dB +.. py:function:: headphones_set_maximum_volume_dB +.. py:function:: speaker_set_maximum_volume_dB + +.. py:function:: headphones_get_minimum_volume_dB +.. py:function:: speaker_get_minimum_volume_dB +.. py:function:: headphones_get_maximum_volume_dB +.. py:function:: speaker_get_maximum_volume_dB + +.. py:function:: headphones_get_volume_relative +.. py:function:: speaker_get_volume_relative +.. py:function:: get_volume_relative diff --git a/docs/api/badge_link.rst b/docs/api/badge_link.rst new file mode 100644 index 0000000000000000000000000000000000000000..565a7952a04e166e9648df75fca7ca94deb0e620 --- /dev/null +++ b/docs/api/badge_link.rst @@ -0,0 +1,31 @@ +.. py:module:: badge_link + +``badge_link`` module +===================== + +.. py:function:: get_active(pin_mask : int) +.. py:function:: enable(pin_mask : int) +.. py:function:: disable(pin_mask : int) + +.. 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 +.. 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 diff --git a/docs/api/ctx.rst b/docs/api/ctx.rst new file mode 100644 index 0000000000000000000000000000000000000000..10d7e7a3871a96057fa4eb106a79844abeb3ccf6 --- /dev/null +++ b/docs/api/ctx.rst @@ -0,0 +1,239 @@ +.. 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 diff --git a/docs/api/hardware.rst b/docs/api/hardware.rst new file mode 100644 index 0000000000000000000000000000000000000000..6ea333af4fbe5e0554dbfc7173a76b95ec231565 --- /dev/null +++ b/docs/api/hardware.rst @@ -0,0 +1,44 @@ +.. 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 + +.. 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 +}; diff --git a/docs/api/kernel.rst b/docs/api/kernel.rst new file mode 100644 index 0000000000000000000000000000000000000000..e23542cfa3fb50a70026e53c5d41583d16c12bd4 --- /dev/null +++ b/docs/api/kernel.rst @@ -0,0 +1,20 @@ +.. py:module:: kernel + +``kernel`` module +================= + +.. py:function:: scheduler_snapshot +.. py:function:: heap_stats + +.. 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 diff --git a/docs/api/leds.rst b/docs/api/leds.rst new file mode 100644 index 0000000000000000000000000000000000000000..44c9829611c1999e9cd22676ea827ea251d9116b --- /dev/null +++ b/docs/api/leds.rst @@ -0,0 +1,17 @@ +.. py:module:: leds + +``leds`` module +=============== + +.. py:function:: set_rgb +.. py:function:: set_hsv +.. py:function:: set_all_rgb +.. py:function:: set_all_hsv +.. py:function:: update +.. py:function:: get_brightness +.. py:function:: set_brightness +.. py:function:: get_auto_update +.. py:function:: set_auto_update +.. py:function:: set_gamma +.. py:function:: get_slew_rate +.. py:function:: set_slew_rate diff --git a/docs/api/synth.rst b/docs/api/synth.rst new file mode 100644 index 0000000000000000000000000000000000000000..eaae62fb9aff5872e250bd712cab0b1b3ffc1452 --- /dev/null +++ b/docs/api/synth.rst @@ -0,0 +1,14 @@ +.. py:module:: synth + +``synth`` module +================ + +.. py:class:: tinysynth + + .. py:method:: start + .. py:method:: stop + .. py:method:: freq + .. py:method:: tone + .. py:method:: waveform + .. py:method:: attack + .. py:method:: decay diff --git a/docs/index.rst b/docs/index.rst index 92eeede97456320158e9113d18db4994e5acd2ae..7f9ccbd05350bfb683549f84cd7b4e4662a9e7f8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -19,6 +19,11 @@ Welcome to flow3r's documentation! :caption: API: api/audio.rst + api/badge_link.rst + api/hardware.rst + api/kernel.rst + api/synth.rst + api/ctx.rst Indices and tables