Skip to content

Fix documentation #17

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
Mar 29, 2022
Merged
Show file tree
Hide file tree
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
13 changes: 6 additions & 7 deletions adafruit_fona/adafruit_fona.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
# pylint: disable=too-many-instance-attributes, too-many-public-methods
class FONA:
"""CircuitPython FONA module interface.
:param ~busio.uart UART: FONA UART connection.
:param ~digialio RST: FONA RST pin.
:param ~digialio RI: Optional FONA Ring Interrupt (RI) pin.
:param bool debug: Enable debugging output.

:param ~busio.UART uart: FONA UART connection.
:param ~digitalio.DigitalInOut rdt: FONA RST pin.
:param ~digitalio.DigitalInOut ri: Optional FONA Ring Interrupt (RI) pin.
:param bool debug: Enable debugging output.
"""

TCP_MODE = const(0) # TCP socket
Expand Down Expand Up @@ -442,9 +442,8 @@ def receive_sms(self) -> Tuple[str, str]:
"""Checks for a message notification from the FONA module,
replies back with the a tuple containing (sender, message).

NOTE: This method needs to be polled consistently due to the lack
of hw-based interrupts in CircuitPython.

:note: This method needs to be polled consistently due to the lack
of hw-based interrupts in CircuitPython.
"""
if self._ri is not None: # poll the RI pin
if self._ri.value:
Expand Down
13 changes: 6 additions & 7 deletions adafruit_fona/adafruit_fona_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,16 @@


class CELLULAR:
"""Interface for connecting to and interacting with GSM and CDMA cellular networks."""
"""Interface for connecting to and interacting with GSM and CDMA cellular networks.

:param FONA fona: The Adafruit FONA module we are using.
:param tuple apn: Tuple containing APN name, (optional) APN username,
and APN password.
"""

def __init__(
self, fona: FONA, apn: Tuple[str, Optional[str], Optional[str]]
) -> None:
"""Initializes interface with cellular network.

:param FONA fona: The Adafruit FONA module we are using.
:param tuple apn: Tuple containing APN name, (optional) APN username,
and APN password.
"""
self._iface = fona
self._apn = apn
self._network_connected = False
Expand Down
9 changes: 4 additions & 5 deletions adafruit_fona/fona_3g.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
# SPDX-License-Identifier: MIT

"""
:py:class:`~adafruit_fona.fona_3g.FONA3G`
`adafruit_fona_3g`
`fona_3g`
================================================================================

FONA3G cellular module instance.
Expand Down Expand Up @@ -40,9 +39,9 @@
class FONA3G(FONA):
"""FONA 3G module interface.

:param ~busio.uart uart: FONA UART connection.
:param ~DigitalInOut rst: FONA RST pin.
:param ~DigitalInOut ri: Optional FONA Ring Interrupt (RI) pin.
:param ~busio.UART uart: FONA UART connection.
:param ~digitalio.DigitalInOut rst: FONA RST pin.
:param ~digitalio.DigitalInOut ri: Optional FONA Ring Interrupt (RI) pin.
:param bool debug: Enable debugging output.
"""

Expand Down
6 changes: 6 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@

.. automodule:: adafruit_fona.adafruit_fona_socket
:members:

.. automodule:: adafruit_fona.adafruit_fona_network
:members:

.. automodule:: adafruit_fona.fona_3g
:members: