From dbe21a72746b00fd70020508903d746a31f6e9a8 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 8 Apr 2020 14:28:50 -0700 Subject: [PATCH] fixed docs about examples; (+) pypi sidebar links --- docs/examples.rst | 8 +++----- examples/cirque_pinnacle_simpletest.py | 6 +++--- examples/cirque_pinnacle_usb_mouse.py | 6 ++---- setup.py | 9 +++++++++ 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/docs/examples.rst b/docs/examples.rst index 0cc6f81..e19a118 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -1,10 +1,10 @@ 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 @@ -12,7 +12,6 @@ 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: @@ -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: diff --git a/examples/cirque_pinnacle_simpletest.py b/examples/cirque_pinnacle_simpletest.py index 4d2569d..8842473 100644 --- a/examples/cirque_pinnacle_simpletest.py +++ b/examples/cirque_pinnacle_simpletest.py @@ -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 @@ -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 diff --git a/examples/cirque_pinnacle_usb_mouse.py b/examples/cirque_pinnacle_usb_mouse.py index 478e8fa..6f649b3 100644 --- a/examples/cirque_pinnacle_usb_mouse.py +++ b/examples/cirque_pinnacle_usb_mouse.py @@ -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 diff --git a/setup.py b/setup.py index b61de2f..6e3104d 100644 --- a/setup.py +++ b/setup.py @@ -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), )