Commit Graph

263 Commits

Author SHA1 Message Date
Limor "Ladyada" Fried 02665fd93f
Merge pull request #96 from KurtE/t4x_neutered
T4.x - Software SPI - don't use FAST_PINIO
2022-05-02 18:29:41 -04:00
Limor "Ladyada" Fried b949d28bde
Merge pull request #93 from eringerli/cs-transaction-management
better transaction management
2022-05-02 18:29:00 -04:00
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
Eva Herrada 204c1de9ab
Bump to 1.11.5 2022-05-02 17:50:30 -04:00
Christian Riggenbach f82f699c64 reuse beginTransactionWithAssertingCS()/endTransactionWithDeassertingCS() 2022-05-02 22:37:27 +02:00
Christian Riggenbach c00ec13218 moved setChipSelect() in front of beginTransactionWithAssertingCS()
This is a more logical order, as beginTransactionWithAssertingCS() and
endTransactionWithDeassertingCS() both call it.
2022-05-02 22:37:17 +02:00
Christian Riggenbach 41635e3c68 beginTransactionWithAssertingCS() and endTransactionWithDeassertingCS()
These two methods are similar to beginTransaction() and endTransaction(),
but, as the name implies, with CS management. They are both public, as
beginTransaction() and endTransaction() are too.
2022-05-02 22:35:38 +02:00
Limor "Ladyada" Fried 4ca049393f
Merge pull request #92 from eringerli/more-specific-documentation
More specific Documentation
2022-05-02 16:11:36 -04:00
Christian Riggenbach a43f6e0921 more specific documentation 2022-05-02 20:57:10 +02:00
Eva Herrada 87af677566
Bump to 1.11.4 2022-04-25 15:18:37 -04:00
Limor "Ladyada" Fried c702120651
Merge pull request #89 from eringerli/cleanup
Cleanup
2022-04-17 18:09:39 -04:00
Christian Riggenbach 4b18d396dc use the typesafe replacement nullptr instead of NULL (since C++11) 2022-04-17 15:03:17 +02:00
Christian Riggenbach 3561fd9ff6 delete works for nullptr, no need to set a member in the destructor 2022-04-17 14:43:57 +02:00
Eva Herrada 1c1c73ee85
Bump to 1.11.3 2022-03-17 11:05:04 -04:00
Ha Thach ef3d84faa8
Merge pull request #84 from yilungao/spi-write-param-const-ness
write method parameter const-ness
2022-03-15 22:09:42 +07:00
Walt b6f7b3abe1 applied clang-format 2022-03-14 22:45:53 -07:00
Walt c41e829dcc write method parameter const-ness
fix https://github.com/adafruit/Adafruit_FRAM_SPI/issues/25
2022-03-10 21:43:30 -08:00
Carter Nelson 1741708a6a
Update library.properties 2022-03-01 06:58:02 -08:00
Limor "Ladyada" Fried 538b07a070
Merge pull request #83 from adafruit/revert-77-master
Revert "Faster hardware SPI writes on SAMD"
2022-02-28 21:06:36 -05:00
Carter Nelson 9bef46eeba
Revert "Faster hardware SPI writes on SAMD" 2022-02-28 17:38:40 -08:00
Eva Herrada 12e4ddb6e0
Bump to 1.11.1 2022-02-10 15:34:16 -05:00
Limor "Ladyada" Fried 512fde07b5
Merge pull request #77 from monroewilliams/master
Faster hardware SPI writes on SAMD
2022-02-02 16:23:57 -05:00
Eva Herrada 92b460c3f4
Bump to 1.11.0 2022-01-31 15:35:59 -05:00
Limor "Ladyada" Fried afbd408d17
Merge pull request #79 from EBD232/master
Add support for Heltec CubeCell modules with ASR6502
2022-01-26 01:06:07 -05:00
Carter Nelson 6b3e7a3374
Update library.properties 2022-01-24 19:31:14 -08:00
Limor "Ladyada" Fried b689ae60a2
Merge pull request #80 from caternuson/no_cs
Refinements for no CS configs
2022-01-24 21:17:42 -05:00
caternuson 7961058057 refinements for no CS configs 2022-01-24 16:56:58 -08:00
Eva Herrada 7a05fccacb
Bump to 1.10.2 2022-01-24 12:08:34 -05:00
Erik Backlund 5e12460a55 Add support for Heltec CubeCell modules with ASR6502 2022-01-22 18:14:58 +01:00
Monroe Williams 5efa09dbe7 Comment formatting. 2022-01-21 18:28:04 -08:00
Monroe Williams 67bd6e7db5 Add a hack to work around the differences between the Adafruit SAMD core and the official Arduino SAMD core. 2022-01-21 18:12:50 -08:00
Limor "Ladyada" Fried a740ebdbea
Merge pull request #78 from solhuebner/solhuebner-ESP-IDF
Enable Adafruit_BusIO as ESP-IDF component support
2022-01-20 19:54:42 -05:00
Sol Huebner b830b3c3d7
Enable Adafruit_BusIO as ESP-IDF component support
Enables Adafruit_BusIO as ESP-IDF component support (with Arduino as component)
2022-01-16 01:27:10 +01:00
Monroe Williams 7f66a34b9c In the Adafruit_SPIDevice class, when running on the SAMD architecture in the hardware SPI case, use the SPIClass::transfer(txbuf, rxbuf, count, block) method when writing instead of looping over individual bytes.
This makes use of DMA and is noticeably faster.
2022-01-13 19:23:05 -08:00
Eva Herrada 69b929d400
1.10.1 2022-01-12 18:06:19 -05:00
Limor "Ladyada" Fried edd38996a1
Merge pull request #76 from monroewilliams/master
Faster hardware SPI writes on ESP32
2022-01-12 13:47:24 -05:00
Monroe Williams 3bdfee4ab8 In the Adafruit_SPIDevice class, when running on ESP32 in the hardware SPI case, use the SPIClass::transferBytes() method when writing instead of looping over individual bytes.
This makes use of the hardware fifo buffers and is noticeably faster.
2022-01-12 00:33:47 -08:00
Eva Herrada ea1e1a833c
Bump to 1.10.0 2022-01-03 16:44:03 -05:00
Limor "Ladyada" Fried 33ff0c4bbc
Merge pull request #75 from eringerli/master
added write_and_read()
2021-12-31 13:27:33 -05:00
Christian Riggenbach c43e0ae83e added write_and_read()
This method adds a wrapper for transfer() with CS-pin and
transaction management
2021-12-31 11:32:36 +01:00
Eva Herrada 9c5fcb76d6
Bump to 1.9.9 2021-12-20 22:58:00 -05:00
Carter Nelson 649bc9f93c
Merge pull request #73 from slaff/fix/spelling
Fixed small spelling mistakes.
2021-12-10 08:38:25 -08:00
Slavey Karadzhov 570d172764 Fixed small spelling mistakes. 2021-12-10 10:12:37 +01:00
Ha Thach bbd2fd63af
increase version to 1.9.8 2021-11-26 13:55:14 +07:00
Ha Thach 690da23a8d
Merge pull request #70 from adafruit/fix-32u
Fix 32u with Wire end()
2021-11-26 13:53:59 +07:00
hathach 44618da5a6 temporarily skip end() for esp32 arch 2021-11-26 13:28:12 +07:00
hathach 389f4cd417 clang 2021-11-26 12:44:53 +07:00
hathach 8b26deb581 fix 32u4 which is avr core without WIRE_HAS_END 2021-11-26 11:37:29 +07:00
hathach 7b97d0de31 add feather32u4 to ci build 2021-11-26 10:01:51 +07:00
Ha Thach 9b8e3d5aed
increase version to 1.9.7 2021-11-24 23:08:15 +07:00