docs: Improve python docs
authorBrendan Le Foll <brendan.le.foll@intel.com>
Fri, 3 Apr 2015 18:41:52 +0000 (19:41 +0100)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Fri, 3 Apr 2015 20:42:31 +0000 (21:42 +0100)
This commit adds a bunch of includes from the C/C++ doxygen doc into the
sphinx/python doc to make it more useful. It also splits out the doc of the
classes using autoclass instead of autodoc to make it nicer to navigate.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
docs/index.md
src/python/docs/example.rst
src/python/docs/index.rst
src/python/docs/mraa.rst

index 0097e53..6d2306d 100644 (file)
@@ -1,4 +1,4 @@
-libmraa - Low Level Skeleton Library for Communication on Intel platforms
+libmraa - Low Level Skeleton Library for Communication on GNU/Linux platforms
 ==============
 
 Libmraa is a C/C++ library with bindings to javascript & python to interface
index 6063f3b..b974a28 100644 (file)
@@ -44,9 +44,9 @@ The I2c module module has a number of different ways of interacting with the
 i2c bus, including a number of overloaded read() calls and the writeReg()
 helper function.
 
-.. literalinclude:: ../../../examples/python/i2c_HMC5883.py
-  :prepend: x = mraa.I2c(0)
-  :start-after: x = mraa.I2c(0)
+.. literalinclude:: ../../../examples/python/bmp85.py
+  :prepend: x = m.I2c(0)
+  :start-after: x = m.I2c(0)
 
 .. literalinclude:: ../../../docs/i2c.txt
 
index b0443de..a5ad1fe 100644 (file)
@@ -4,9 +4,11 @@
    contain the root `toctree` directive.
 
 Welcome to mraa's documentation!
-=============================
+================================
 
-Contents:
+.. include:: ../../../docs/index.md
+  :start-after: ==============
+  :end-before: ## API
 
 .. toctree::
    :maxdepth: 2
@@ -14,6 +16,32 @@ Contents:
    mraa
    example
 
+Supported Platforms
+===================
+
+   * `Galileo Gen 1 - Rev D <../galileorevd.html>`_
+   * `Galileo Gen 2 - Rev H <../galileorevh.html>`_
+   * `Intel Edison <../edison.html>`_
+   * `Intel(R) NUC DE3815tykhe <../de3815.html>`_
+   * `Intel(R) Minnowboard Max <../minnowmax.html>`_
+   * `Raspberry Pi <../rasspi.html>`_
+
+Compiling & Debugging libmraa
+=============================
+
+Libmraa is a C library and SWIG is used to generate bindings therefore to
+debug, you very quickly need to use the same methods as you would for debugging
+a C library. Generally attaching gdb to python works well, build mraa with
+debug symbols and set breakpoints either in the SWIG _wrap functions, the C++
+method/functions or the underlying C function. More info can be found on the
+C/C++ documentation:
+   * `Debugging <../debugging.html>`_
+   * `Building from source <../building.html>`_
+
+API Changelog
+=============
+.. include:: ../../../docs/index.md
+  :start-after: API Changelog
 
 Indices and tables
 ==================
index 8e442e1..04e7c1e 100644 (file)
@@ -1,7 +1,52 @@
-mraa module
-============
+###
+API
+###
 
-.. automodule:: mraa
+Aio
+===
+.. autoclass:: mraa.Aio
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+I2c
+===
+.. autoclass:: mraa.I2c
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+Gpio
+====
+.. autoclass:: mraa.Gpio
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+Pwm
+===
+.. autoclass:: mraa.Pwm
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+Spi
+===
+.. autoclass:: mraa.Spi
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+Uart
+====
+.. autoclass:: mraa.Uart
     :members:
     :undoc-members:
     :show-inheritance:
+
+Common
+======
+
+.. automodule:: mraa
+   :members:
+   :exclude-members: Gpio, Aio, Uart, Spi, I2c, Pwm, uint8Array, uint8Array_frompointer