Skip to content

Commit 5533671

Browse files
committed
Add examples of non-applicable cases and SPI link
1 parent 1ae88c3 commit 5533671

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

docs/design_guide.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,16 @@ backticks ``:class:`~adafruit_motor.servo.Servo```. You must also add the refer
497497
Use ``adafruit_register`` when possible
498498
--------------------------------------------------------------------------------
499499
`Register <https://github.com/adafruit/Adafruit_CircuitPython_Register>`_ is
500-
a foundational library that manages packing and unpacking data from device
501-
registers. When possible, use it for unpacking and packing registers. This
502-
ensures the packing code is shared amongst all registers. Furthermore, it
503-
simplifies device definitions by making them declarative (only data.)
500+
a foundational library that manages packing and unpacking data from I2C device
501+
registers. There is also `Register SPI <https://github.com/adafruit/Adafruit_CircuitPython_Register_SPI>`_
502+
for SPI devices. When possible, use one of these libraries for unpacking and
503+
packing registers. This ensures the packing code is shared amongst all
504+
registers (even across drivers). Furthermore, it simplifies device definitions
505+
by making them declarative (only data.)
506+
507+
Values with non-consecutive bits in a register or that represent FIFO endpoints
508+
may not map well to existing register classes. In unique cases like these, it is
509+
ok to read and write the register directly.
504510

505511
*Do not* add all registers from a datasheet upfront. Instead, only add the ones
506512
necessary for the functionality the driver exposes. Adding them all will lead to

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy