|
@@ -1,55 +1,91 @@
|
|
|
Reference
|
|
Reference
|
|
|
=========
|
|
=========
|
|
|
|
|
|
|
|
-This page contains the API documentation of the ``flipperzero`` module.
|
|
|
|
|
|
|
+This page contains the API documentation of the ``flipperzero`` module and some built-in functions.
|
|
|
|
|
|
|
|
Vibration
|
|
Vibration
|
|
|
---------
|
|
---------
|
|
|
|
|
|
|
|
Control the vibration motor of your Flipper.
|
|
Control the vibration motor of your Flipper.
|
|
|
|
|
|
|
|
-.. automodule:: flipperzero._vibro
|
|
|
|
|
- :members:
|
|
|
|
|
|
|
+.. autofunction:: flipperzero.vibro_set
|
|
|
|
|
|
|
|
Light
|
|
Light
|
|
|
-----
|
|
-----
|
|
|
|
|
|
|
|
Control the RGB LED and display backlight of your Flipper.
|
|
Control the RGB LED and display backlight of your Flipper.
|
|
|
|
|
|
|
|
-.. automodule:: flipperzero._light
|
|
|
|
|
- :members:
|
|
|
|
|
|
|
+.. autodata:: flipperzero.LIGHT_RED
|
|
|
|
|
+.. autodata:: flipperzero.LIGHT_GREEN
|
|
|
|
|
+.. autodata:: flipperzero.LIGHT_BLUE
|
|
|
|
|
+.. autodata:: flipperzero.LIGHT_BACKLIGHT
|
|
|
|
|
+.. autofunction:: flipperzero.light_set
|
|
|
|
|
+.. autofunction:: flipperzero.light_blink_start
|
|
|
|
|
+.. autofunction:: flipperzero.light_blink_set_color
|
|
|
|
|
+.. autofunction:: flipperzero.light_blink_stop
|
|
|
|
|
|
|
|
Speaker
|
|
Speaker
|
|
|
-------
|
|
-------
|
|
|
|
|
|
|
|
Full control over the built-in speaker module.
|
|
Full control over the built-in speaker module.
|
|
|
|
|
|
|
|
-.. automodule:: flipperzero._speaker
|
|
|
|
|
- :members:
|
|
|
|
|
|
|
+.. autofunction:: flipperzero.speaker_start
|
|
|
|
|
+.. autofunction:: flipperzero.speaker_set_volume
|
|
|
|
|
+.. autofunction:: flipperzero.speaker_stop
|
|
|
|
|
|
|
|
Input
|
|
Input
|
|
|
-----
|
|
-----
|
|
|
|
|
|
|
|
Make your application interactive with full control over the Flipper's hardware buttons.
|
|
Make your application interactive with full control over the Flipper's hardware buttons.
|
|
|
|
|
|
|
|
-.. automodule:: flipperzero._input
|
|
|
|
|
- :members:
|
|
|
|
|
|
|
+.. autodata:: flipperzero.INPUT_BUTTON_UP
|
|
|
|
|
+.. autodata:: flipperzero.INPUT_BUTTON_DOWN
|
|
|
|
|
+.. autodata:: flipperzero.INPUT_BUTTON_RIGHT
|
|
|
|
|
+.. autodata:: flipperzero.INPUT_BUTTON_LEFT
|
|
|
|
|
+.. autodata:: flipperzero.INPUT_BUTTON_OK
|
|
|
|
|
+.. autodata:: flipperzero.INPUT_BUTTON_BACK
|
|
|
|
|
+.. autodata:: flipperzero.INPUT_TYPE_PRESS
|
|
|
|
|
+.. autodata:: flipperzero.INPUT_TYPE_RELEASE
|
|
|
|
|
+.. autodata:: flipperzero.INPUT_TYPE_SHORT
|
|
|
|
|
+.. autodata:: flipperzero.INPUT_TYPE_LONG
|
|
|
|
|
+.. autodata:: flipperzero.INPUT_TYPE_REPEAT
|
|
|
|
|
+.. autodecorator:: flipperzero.on_input
|
|
|
|
|
|
|
|
Canvas
|
|
Canvas
|
|
|
------
|
|
------
|
|
|
|
|
|
|
|
Write text and draw dots and shapes on the the display.
|
|
Write text and draw dots and shapes on the the display.
|
|
|
|
|
|
|
|
-.. automodule:: flipperzero._canvas
|
|
|
|
|
- :members:
|
|
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_update
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_clear
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_width
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_height
|
|
|
|
|
+.. autodata:: flipperzero.COLOR_BLACK
|
|
|
|
|
+.. autodata:: flipperzero.COLOR_WHITE
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_set_color
|
|
|
|
|
+.. autodata:: flipperzero.ALIGN_BEGIN
|
|
|
|
|
+.. autodata:: flipperzero.ALIGN_END
|
|
|
|
|
+.. autodata:: flipperzero.ALIGN_CENTER
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_set_text_align
|
|
|
|
|
+.. autodata:: flipperzero.FONT_PRIMARY
|
|
|
|
|
+.. autodata:: flipperzero.FONT_SECONDARY
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_set_font
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_set_text
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_draw_dot
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_draw_box
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_draw_frame
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_draw_line
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_draw_circle
|
|
|
|
|
+.. autofunction:: flipperzero.canvas_draw_disc
|
|
|
|
|
|
|
|
Dialog
|
|
Dialog
|
|
|
------
|
|
------
|
|
|
|
|
|
|
|
Display message dialogs on the display for user infos and confirm actions.
|
|
Display message dialogs on the display for user infos and confirm actions.
|
|
|
|
|
|
|
|
-.. automodule:: flipperzero._modal
|
|
|
|
|
- :members:
|
|
|
|
|
|
|
+.. autofunction:: flipperzero.dialog_message_set_header
|
|
|
|
|
+.. autofunction:: flipperzero.dialog_message_set_text
|
|
|
|
|
+.. autofunction:: flipperzero.dialog_message_set_button
|
|
|
|
|
|
|
|
Built-In
|
|
Built-In
|
|
|
--------
|
|
--------
|
|
@@ -57,5 +93,16 @@ Built-In
|
|
|
The functions in this section are `not` part of the ``flipperzero`` module.
|
|
The functions in this section are `not` part of the ``flipperzero`` module.
|
|
|
They're members of the global namespace instead.
|
|
They're members of the global namespace instead.
|
|
|
|
|
|
|
|
-.. automodule:: flipperzero._builtins
|
|
|
|
|
- :members:
|
|
|
|
|
|
|
+.. py:function:: print(*objects, sep=' ', end='\n', file=None, flush=False) -> None
|
|
|
|
|
+
|
|
|
|
|
+ The standard Python `print <https://docs.python.org/3/library/functions.html#print>`_ function.
|
|
|
|
|
+
|
|
|
|
|
+ :param objects: The objects to print (mostly a single string).
|
|
|
|
|
+ :param sep: The separator to use between the objects.
|
|
|
|
|
+ :param end: The line terminator character to use.
|
|
|
|
|
+
|
|
|
|
|
+ .. attention::
|
|
|
|
|
+
|
|
|
|
|
+ This function prints to the internal log buffer.
|
|
|
|
|
+ Check out the `Flipper Zero docs <https://docs.flipper.net/development/cli#_yZ2E>`_ on how to reveal them in the CLI interface.
|
|
|
|
|
+
|