Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • flow3r/flow3r-firmware
  • Vespasian/flow3r-firmware
  • alxndr42/flow3r-firmware
  • pl/flow3r-firmware
  • Kari/flow3r-firmware
  • raimue/flow3r-firmware
  • grandchild/flow3r-firmware
  • mu5tach3/flow3r-firmware
  • Nervengift/flow3r-firmware
  • arachnist/flow3r-firmware
  • TheNewCivilian/flow3r-firmware
  • alibi/flow3r-firmware
  • manuel_v/flow3r-firmware
  • xeniter/flow3r-firmware
  • maxbachmann/flow3r-firmware
  • yGifoom/flow3r-firmware
  • istobic/flow3r-firmware
  • EiNSTeiN_/flow3r-firmware
  • gnudalf/flow3r-firmware
  • 999eagle/flow3r-firmware
  • toerb/flow3r-firmware
  • pandark/flow3r-firmware
  • teal/flow3r-firmware
  • x42/flow3r-firmware
  • alufers/flow3r-firmware
  • dos/flow3r-firmware
  • yrlf/flow3r-firmware
  • LuKaRo/flow3r-firmware
  • ThomasElRubio/flow3r-firmware
  • ai/flow3r-firmware
  • T_X/flow3r-firmware
  • highTower/flow3r-firmware
  • beanieboi/flow3r-firmware
  • Woazboat/flow3r-firmware
  • gooniesbro/flow3r-firmware
  • marvino/flow3r-firmware
  • kressnerd/flow3r-firmware
  • quazgar/flow3r-firmware
  • aoid/flow3r-firmware
  • jkj/flow3r-firmware
  • naomi/flow3r-firmware
41 results
Select Git revision
Show changes
Commits on Source (3)
...@@ -13,3 +13,6 @@ __pycache__ ...@@ -13,3 +13,6 @@ __pycache__
# Python # Python
.venv .venv
# sphinx
docs/_build/
...@@ -248,3 +248,19 @@ Then write and read from each side: ...@@ -248,3 +248,19 @@ Then write and read from each side:
uart.write("hiiii") uart.write("hiiii")
uart.read(5) uart.read(5)
``` ```
### Documentation
To build sphinx docs:
```
cd docs
make html
firefox _build/html/index.html
```
To continuously build on change:
```
watchexec make html
```
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.. _Badge Link:
Badge Link
==========
Badge Link is a protocol for digital communication over the 3.5mm ports.
You can configure individual pins (tip, ring) of each of the two 3.5mm ports
(line in, line out) to be used as TX or RX for UART, at any baud rate up to
5mbit in theory. In practice lower baud rates are recommended to avoid data
corruption.
MIDI can be used by configuring the baud rate to 31250. There is no galvanic
isolation, but there are current limiting resistors.
The input protection can handle between +5v and -3v.
For the micropython badge link API, see the badge_link API docs
Hardware Specs
==============
* ESP32-S3 SoC
* 240MHz
* 8MiB SPI RAM, 512KiB SRAM
* 16MiB flash
* WiFi (2.4GHz, b/g/n)
* Bluetooth LE (no bluetooth audio)
* Round display, 240x240px, compatible with GC9A01
* Two speakers
* Two 3.5mm ports
* Headphone / line out and microphone / line in
* :ref:`Badge Link`
* Can be configured in each 3.5mm port (3.3v UART)
* MIDI compatible (31250 baud UART)
* USB-C
* Two modes:
* USB Serial/JTAG (implemented in hardware)
* TinyUSB (for serial, mass storage, USB MIDI)
* SBU1/SBU2 (sideband use) pins have UART RX/TX for early debug
* Passive analog audio out
* Not supported: USB host
* 40 RGB LEDs (WS2812C)
* MicroSD card slot
* Accelerometer? XXX
* Battery compatible with MCH2022 badge
import os
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'flow3r'
copyright = '2023'
author = 'ccc'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = []
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
.. flow3r documentation master file, created by
sphinx-quickstart on Sun Jun 11 19:43:11 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to flow3r's documentation!
==================================
.. toctree::
:maxdepth: 1
:caption: The badge:
badge/hardware_specs.rst
badge/badge_link.rst
.. toctree::
:maxdepth: 1
:caption: Python API:
python/overview.rst
python/audio.rst
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
.. py:module:: audio
``audio`` module
================
(XXX when it says bool in the python api that's often an int, should change
that)
.. py:function:: headset_is_connected() -> bool
.. c:function:: uint8_t audio_headset_is_connected()
Returns 1 if headphones with microphone were connected to the headphone
jack at the last call of audio_update_jacksense.
.. py:function:: headphones_are_connected() -> bool
.. c:function:: uint8_t audio_headphones_are_connected()
Returns 1 if headphones with or without microphone were connected to the
headphone jack at the last call of audio_update_jacksense.
.. py:function:: headphones_detection_override(enable : bool)
.. c:function:: void audio_headphones_detection_override(uint8_t enable)
If a sleeve contact mic doesn't pull the detection pin low enough the
codec's built in headphone detection might fail. Calling this function
with 'enable = 1' overrides the detection and assumes there's headphones
plugged in. Call with 'enable = 0' to revert to automatic detection.
.. py:function:: headphones_set_volume_dB(vol_dB : float) -> float
.. c:function:: float audio_headphones_set_volume_dB(float vol_dB);
.. py:function:: speaker_set_volume_dB(vol_dB : float) -> float
.. c:function:: float audio_speaker_set_volume_dB(float vol_dB);
.. py:function:: set_volume_dB(vol_dB : float) -> float
.. c:function:: float audio_set_volume_dB(float vol_dB);
Attempts to set target volume for the headphone output/onboard speakers
respectively, clamps/rounds if necessary and returns the actual volume.
Absolute reference arbitrary.
Does not unmute, use :code:`audio_{headphones_/speaker_/}set_mute` as
needed.
Enters fake mute if requested volume is below the value set by
:code:`audio_{headphones/speaker}_set_minimum_volume_user`.
Note: This function uses a hardware PGA for the coarse value and software
for the fine value. These two methods are as of yet not synced so that
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
Python API
==========