Go to file
KurtE 17cf18bf5b T4.x - Software SPI - don't use FAST_PINIO
The original problem was that the code defined the registers and mask as 8 bits, when the T4.x ones are 32 bits.  So it only worked on a subset of pins.

So first fix would be to simply define these values as 32 bits.  But doing so leaves you code at risk as the Set/Clear code in this library is not atomic,
Example: *clkPort |= clkPinMask;

So if something happens in the small time window after the time the register is retrieved and then manipulated and written back, such as an interrupt.
Or maybe if other hardware is driving the pin.  These changes would be
clobbered by the above code.

Not sure how many other boards (if any) may be hit by the same issue.

It is not an issue with T3.x as the Teensy code uses the M3/M4 bitband support, so for each pin there is a unique memory address for it and these operations are atomic.

Note: the Arm M7 does not support bitbands.  However  in these caseAtomic code can be written for the T4.x by instead using the DR register of the IO port, you use the DR_SET, DR_CLEAR, DR_TOGGLE registers instead which do as the names imply
the do that operation only those pins who have a 1 bit set to the value...
2022-05-02 15:16:52 -07:00
.github add feather32u4 to ci build 2021-11-26 10:01:51 +07:00
examples Fixed small spelling mistakes. 2021-12-10 10:12:37 +01:00
Adafruit_BusIO_Register.cpp use the typesafe replacement nullptr instead of NULL (since C++11) 2022-04-17 15:03:17 +02:00
Adafruit_BusIO_Register.h Merge pull request #73 from slaff/fix/spelling 2021-12-10 08:38:25 -08:00
Adafruit_I2CDevice.cpp use the typesafe replacement nullptr instead of NULL (since C++11) 2022-04-17 15:03:17 +02:00
Adafruit_I2CDevice.h use the typesafe replacement nullptr instead of NULL (since C++11) 2022-04-17 15:03:17 +02:00
Adafruit_I2CRegister.h ckag 2021-11-20 01:09:02 -05:00
Adafruit_SPIDevice.cpp more specific documentation 2022-05-02 20:57:10 +02:00
Adafruit_SPIDevice.h T4.x - Software SPI - don't use FAST_PINIO 2022-05-02 15:16:52 -07:00
CMakeLists.txt Enable Adafruit_BusIO as ESP-IDF component support 2022-01-16 01:27:10 +01:00
LICENSE init 2019-03-07 13:49:19 -05:00
README.md Fixed small spelling mistakes. 2021-12-10 10:12:37 +01:00
component.mk Enable Adafruit_BusIO as ESP-IDF component support 2022-01-16 01:27:10 +01:00
library.properties Bump to 1.11.4 2022-04-25 15:18:37 -04:00

README.md

Adafruit Bus IO Library Build Status

This is a helper library to abstract away I2C & SPI transactions and registers

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

MIT license, all text above must be included in any redistribution