Skip to content

Commit

Permalink
fixed docs about examples; (+) pypi sidebar links
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Apr 8, 2020
1 parent 6843f60 commit dbe21a7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
8 changes: 3 additions & 5 deletions docs/examples.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
Simple Test
-----------

Ensure your device works with this simple test (using SPI protocol).
Ensure your device works with this simple test.

.. literalinclude:: ../examples/cirque_pinnacle_spi_simpletest.py
:caption: examples/cirque_pinnacle_spi_simpletest.py
.. literalinclude:: ../examples/cirque_pinnacle_simpletest.py
:caption: examples/cirque_pinnacle_simpletest.py
:linenos:

USB Mouse example
-----------------

This example uses CircuitPython's built-in `usb_hid` API to emulate a mouse with the Cirque circle trackpad.


.. literalinclude:: ../examples/cirque_pinnacle_usb_mouse.py
:caption: examples/cirque_pinnacle_usb_mouse.py
:linenos:
Expand All @@ -22,7 +21,6 @@ AnyMeas mode example

This example uses the Pinnacle touch controller's AnyMeas mode to fetch raw ADC values.


.. literalinclude:: ../examples/cirque_pinnacle_anymeas_test.py
:caption: examples/cirque_pinnacle_anymeas_test.py
:linenos:
6 changes: 3 additions & 3 deletions examples/cirque_pinnacle_simpletest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""A simple test example. this example also works with glidepoint_lite.py"""
"""A simple test example. This example also works with glidepoint_lite.py"""
import time
import struct
import board
Expand All @@ -9,11 +9,11 @@
# from circuitpython_cirque_pinnacle.glidepoint import PinnacleTouchI2C, ABSOLUTE, RELATIVE
# i2c = board.I2C()

spi = board.SPI() # if using a trackpad configured for SPI
ss_pin = DigitalInOut(board.D7)
dr_pin = DigitalInOut(board.D2)

# if using a trackpad configured for SPI
spi = board.SPI()
ss_pin = DigitalInOut(board.D7)
tpad = PinnacleTouchSPI(spi, ss_pin) # NOTE we did not pass the dr_pin
# if using a trackpad configured for I2C
# tpad = PinnacleTouchI2C(i2c) # NOTE we did not pass the dr_pin
Expand Down
6 changes: 2 additions & 4 deletions examples/cirque_pinnacle_usb_mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
# from circuitpython_cirque_pinnacle.glidepoint import PinnacleTouchI2C, RELATIVE
# i2c = board.I2C()

# if using a trackpad configured for SPI
spi = board.SPI()
ss_pin = DigitalInOut(board.D7)

dr_pin = DigitalInOut(board.D2)

# if using a trackpad configured for SPI
spi = board.SPI()
ss_pin = DigitalInOut(board.D7)
tpad = PinnacleTouchSPI(spi, ss_pin) # NOTE we did not pass the dr_pin
# if using a trackpad configured for I2C
# tpad = PinnacleTouchI2C(i2c) # NOTE we did not pass the dr_pin
Expand Down
9 changes: 9 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,13 @@
# TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER,
# CHANGE `py_modules=['...']` TO `packages=['...']`
packages=['circuitpython_cirque_pinnacle'],

# Specifiy your homepage URL for your project here
url=repo,

# Extra links for the sidebar on pypi
project_urls={
'Documentation': 'https://circuitpython-cirque-pinnacle.readthedocs.io',
},
download_url='{}/releases'.format(repo),
)

0 comments on commit dbe21a7

Please sign in to comment.