Skip to content

Commit 27b3509

Browse files
Merge pull request #19 from jposada202020/improv_documentation
improving_docs
2 parents 51646f1 + 4c607a0 commit 27b3509

File tree

5 files changed

+33
-13
lines changed

5 files changed

+33
-13
lines changed

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Introduction
1313
:target: https://github.com/adafruit/Adafruit_CircuitPython_SI4713/actions/
1414
:alt: Build Status
1515

16+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
17+
:target: https://github.com/psf/black
18+
:alt: Code Style: Black
19+
1620
CircuitPython module for SI4713 and SI4721 FM RDS transmitter.
1721

1822
Dependencies

adafruit_si4713.py

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@
1111
at: https://github.com/adafruit/Adafruit-Si4713-Library/
1212
1313
* Author(s): Tony DiCola
14+
15+
**Hardware:**
16+
17+
* `Adafruit Stereo FM Transmitter with RDS/RBDS Breakout - Si4713
18+
<https://www.adafruit.com/product/1958>`_ (Product ID: 1958)
19+
20+
21+
**Software and Dependencies:**
22+
23+
* Adafruit CircuitPython firmware for the supported boards:
24+
https://circuitpython.org/downloads
25+
26+
* Adafruit's Bus Device library:
27+
https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
28+
1429
"""
1530
import time
1631

@@ -86,14 +101,14 @@
86101

87102
class SI4713:
88103
"""SI4713 RDS FM transmitter. Initialize by specifying:
89-
- i2c: The I2C bus connected to the board.
90-
91-
Optionally specify:
92-
- address: The I2C address if it has been changed.
93-
- reset: A DigitalInOut instance connected to the board's reset line,
94-
this will be used to perform a soft reset when necessary.
95-
- timeout_s: The amount of time (in seconds) to wait for a command to
96-
succeed. If this timeout is exceed a runtime error is thrown.
104+
105+
:param ~busio.I2C i2c: The I2C bus connected to the board.
106+
:param int address: The I2C address if it has been changed. Defaults to :const:`0x63`
107+
:param ~digitalio.DigitalInOut reset: A DigitalInOut instance connected to
108+
the board's reset line, this will be used to perform a soft reset when necessary.
109+
:param float timeout_s: The amount of time (in seconds) to wait for a command to
110+
succeed. If this timeout is exceed a runtime error is thrown. Defaults to :const:`0.1`
111+
97112
"""
98113

99114
# Class-level buffer to reduce allocations and heap fragmentation.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
extensions = [
1818
"sphinx.ext.autodoc",
1919
"sphinx.ext.intersphinx",
20-
"sphinx.ext.todo",
20+
"sphinx.ext.viewcode",
2121
]
2222

2323
# Uncomment the below if you use native CircuitPython modules such as

docs/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ Table of Contents
2323
.. toctree::
2424
:caption: Tutorials
2525

26+
Adafruit Stereo FM Transmitter with RDS/RBDS Breakout - Si4713 Learning Guide <https://learn.adafruit.com/adafruit-si4713-fm-radio-transmitter-with-rds-rdbs-support>
27+
2628
.. toctree::
2729
:caption: Related Products
2830

31+
Adafruit Stereo FM Transmitter with RDS/RBDS Breakout - Si4713 <https://www.adafruit.com/product/1958>
32+
2933
.. toctree::
3034
:caption: Other Links
3135

examples/si4713_simpletest.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@
44
# Simple demo of using the SI4743 RDS FM transmitter.
55

66
import time
7-
87
import board
9-
import busio
108
import digitalio
11-
129
import adafruit_si4713
1310

1411
# Specify the FM frequency to transmit on in kilohertz. As the datasheet
1512
# mentions you can only specify 50khz steps!
1613
FREQUENCY_KHZ = 102300 # 102.300mhz
1714

1815
# Initialize I2C bus.
19-
i2c = busio.I2C(board.SCL, board.SDA)
16+
i2c = board.I2C() # uses board.SCL and board.SDA
2017

2118
# Initialize SI4713.
2219
# si4713 = adafruit_si4713.SI4713(i2c)

0 commit comments

Comments
 (0)