Skip to content

Sphinx tweaks. #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions adafruit_tpa2016.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,25 @@ class TPA2016:
"""NoiseGate function enable. Enabled by default. Can only be enabled when compression ratio
is NOT 1:1. To disable, set to ``False``."""
output_limiter_disable = RWBit(0x06, 7)
"""Output limiter disable. Enabled by default when compression ratio is NOT 1:1. Can only be
disabled if compression ratio is 1:1. To disable, set to ``True``."""
"""

Output limiter disable.

Enabled by default when compression ratio is NOT 1:1. Can only be
disabled if compression ratio is 1:1. To disable, set to ``True``.
"""

noise_gate_threshold = RWBits(2, 0x06, 5)
"""Noise Gate threshold in mV. Noise gate settings are 1mV, 4mV, 10mV, and 20mV. Settings
"""
Noise Gate threshold in mV.

Noise gate settings are 1mV, 4mV, 10mV, and 20mV. Settings
options are NOISE_GATE_1, NOISE_GATE_4, NOISE_GATE_10, NOISE_GATE_20. Only functional when
compression ratio is NOT 1:1. Defaults to 4mV.

This example sets the noise gate threshold to 10mV.

..code-block:: python
.. code-block:: python

import adafruit_tpa2016
import busio
Expand All @@ -122,12 +130,15 @@ class TPA2016:
"""

compression_ratio = RWBits(2, 0x07, 0)
"""The compression ratio. Ratio settings are: 1:1. 2:1, 4:1, 8:1. Settings options are:
"""
The compression ratio.

Ratio settings are: 1:1. 2:1, 4:1, 8:1. Settings options are:
COMPRESSION_1_1, COMPRESSION_2_1, COMPRESSION_4_1, COMPRESSION_8_1. Defaults to 4:1.

This example sets the compression ratio to 2:1.

..code-block:: python
.. code-block:: python

import adafruit_tpa2016
import busio
Expand All @@ -151,7 +162,7 @@ def attack_time(self):

This example sets the attack time to 1, or 0.1067ms.

..code-block:: python
.. code-block:: python

import adafruit_tpa2016
import busio
Expand Down Expand Up @@ -180,7 +191,7 @@ def release_time(self):

This example sets release time to 1, or 0.0137ms.

..code-block:: python
.. code-block:: python

import adafruit_tpa2016
import busio
Expand Down Expand Up @@ -209,7 +220,7 @@ def hold_time(self):

This example sets hold time to 1, or 0.0137ms.

..code-block:: python
.. code-block:: python

import adafruit_tpa2016
import busio
Expand Down Expand Up @@ -238,7 +249,7 @@ def fixed_gain(self):

The following example sets the fixed gain to -16dB.

..code-block:: python
.. code-block:: python

import adafruit_tpa2016
import busio
Expand Down