drivers: cst816s: Finalize docstrings
This commit is contained in:
parent
85079c149b
commit
d5c629a9ac
2 changed files with 10 additions and 11 deletions
|
@ -41,7 +41,6 @@ Device drivers
|
||||||
|
|
||||||
.. automodule:: drivers.cst816s
|
.. automodule:: drivers.cst816s
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
|
||||||
|
|
||||||
.. automodule:: drivers.nrf_rtc
|
.. automodule:: drivers.nrf_rtc
|
||||||
:members:
|
:members:
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||||
# Copyright (C) 2020 Daniel Thompson
|
# Copyright (C) 2020 Daniel Thompson
|
||||||
|
|
||||||
"""Hynitron CST816S touch contoller driver for MicroPython.
|
"""Hynitron CST816S touch contoller driver
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
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)"`
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import array
|
import array
|
||||||
|
|
||||||
class CST816S:
|
class CST816S:
|
||||||
"""Hynitron CST816S I2C touch controller driver."""
|
"""Hynitron CST816S I2C touch controller driver.
|
||||||
|
|
||||||
|
.. automethod:: __init__
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, bus):
|
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.i2c = bus
|
||||||
self.dbuf = bytearray(6)
|
self.dbuf = bytearray(6)
|
||||||
self.event = array.array('H', (0, 0, 0))
|
self.event = array.array('H', (0, 0, 0))
|
||||||
|
|
Loading…
Add table
Reference in a new issue