1
0
Fork 0

drivers: cst816s: Finalize docstrings

This commit is contained in:
Daniel Thompson 2020-05-14 21:36:09 +01:00
parent 85079c149b
commit d5c629a9ac
2 changed files with 10 additions and 11 deletions

View file

@ -41,7 +41,6 @@ Device drivers
.. automodule:: drivers.cst816s
:members:
:undoc-members:
.. automodule:: drivers.nrf_rtc
:members:

View file

@ -1,23 +1,23 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Daniel Thompson
"""Hynitron CST816S touch contoller driver for MicroPython.
After modifying this file we can test the changes by replacing the
frozen driver with the modified driver. The following command will
upload the code and integrate it into the watch namespace::
./tools/wasptool\
--exec wasp/drivers/cst816s.py\
--eval "watch.touch = CST816S(watch.i2c)"`
"""Hynitron CST816S touch contoller driver
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import array
class CST816S:
"""Hynitron CST816S I2C touch controller driver."""
"""Hynitron CST816S I2C touch controller driver.
.. automethod:: __init__
"""
def __init__(self, bus):
"""Specify the bus used by the touch controller.
:param machine.I2C bus: I2C bus for the CST816S.
"""
self.i2c = bus
self.dbuf = bytearray(6)
self.event = array.array('H', (0, 0, 0))