Henry Gabryjelski
439c6b51c9
Narrowly silence new (GCC 8.1+) warning ( #290 )
...
Fixes #287
The warnings look like:
```
Line 338 Char 37
warning: 'void* memcpy(void*, const void*, size_t)'
writing to an object of type 'struct DmacDescriptor'
with no trivial copy-assignment [-Wclass-memaccess]
```
2021-04-30 11:42:15 -04:00
Rudolph Riedel
3c7a2d5bad
Added a isBusy() method to SPI calls to allow non-blocking polling of the DMA transfer status.
2020-12-28 13:51:55 +01:00
moussaillon
814a352588
Avoiding unused parameter warning for dmaDoNothingCallback()
2020-09-15 16:32:21 +02:00
Phillip Burgess
1e92424a50
Obscure SPI DMA bug fixed. Also, big non-blocking transfers supported.
2020-08-20 20:22:39 -07:00
Phillip Burgess
420b9a8429
Small SPI lib fix, add SWO pin to variant header
2020-08-19 11:36:20 -07:00
Henry Gabryjelski
9ab68e1aff
avoid warnings on unused parameter
2020-01-17 01:16:20 -08:00
Phillip Burgess
a2c0a5b547
SAMD21: Fix freq clipping in SPI.h, allow 24 MHz SPI
...
SPI clock freq previously clipped at MAX_SPI/2 (6 MHz) rather than MAX_SPI. Now works correctly.
Additionally, MAX_SPI set at 24 MHz on SAMD21. This is only slightly beyond spec and so far seems reliable with SD and SdFat tests on M0 Adalogger, eyes on HalloWing M0.
2019-11-04 14:45:51 -08:00
ladyada
66a844f050
fix for trinket/gemma m0
2019-06-15 22:59:15 -04:00
Phillip Burgess
9a07f418ce
SPI DMA transfer() function working now
2019-05-22 21:35:58 -07:00
Phillip Burgess
8b88806d46
SPI DMA still WIP still not working
2019-05-22 21:11:49 -07:00
Phillip Burgess
8f123f315b
SPI DMA WIP and still not working :/
2019-05-22 14:22:50 -07:00
Phillip Burgess
99b90ffb48
DMA WIP still not working
2019-05-22 11:17:52 -07:00
Phillip Burgess
91e43ef443
SPIClass DMA transfer() function WIP
2019-05-21 22:14:45 -07:00
Phillip Burgess
e86546521f
Separated getDMACID() function into getDMAC_ID_TX() and getDMAC_ID_RX()
2019-05-10 17:46:33 -07:00
Phillip Burgess
7616dab297
SERCOM stuff - simplify, cleanup, add SAMD21 dummy funcs
2019-05-08 09:44:05 -07:00
Phillip Burgess
59d869d79d
WIP change SPI SERCOM clock source at runtime rather than compile-time
2019-05-07 23:05:52 -07:00
Phillip Burgess
2b2b8f0610
Add max SPI speed select menu for M4
2019-04-21 22:30:57 -07:00
ladyada
a2d9587950
up to 24 mhz SPI on SAMD51. added another ESP32 def
2019-04-04 13:44:37 -04:00
Grzegorz Gajoch
2facbf6177
Fix interrupt mask to block in SPI library
2018-03-20 11:07:43 -04:00
José Ángel Jiménez
4294d36b89
Fix calculation of SPI_MIN_CLOCK_DIVIDER in SPI.h
...
The previous version of SPI.h works only for the SAMD21G18A variant and only for a 48 MHz system clock. For the rest of variants, it sets SPI_MIN_CLOCK_DIVIDER to 2, which is incorrect for a 48 MHz system clock.
The SAMD21 datasheet specifies a typical SPI SCK period (tSCK) of 42 ns, see "Table 36-48. SPI Timing Characteristics and Requirements", which translates into a maximum SPI clock of 23.8 MHz.
The new code conservatively sets the divider for a 12 MHz maximum SPI clock, taking into account any value for the system clock (not only 48 MHz). It also executes for other variants of the SAMD, not only SAMD21G18A.
Can you, please, review this patch?
2018-01-31 16:50:12 +01:00
Sandeep Mistry
78f79ed2c0
Add SPI.notUsingInterrupt(...)
2018-01-02 11:57:40 -05:00
Sandeep Mistry
e77ae8fe8e
Optimize SPI transfers
2016-11-17 17:17:05 -05:00
Cristian Maglie
4568471543
Made multiple SPI instances fully configurable from variant
2015-11-17 17:13:07 +01:00
Sandeep Mistry
82ddeb0eef
Add SPI. transfer16(...) API
2015-11-04 15:06:02 -05:00
Paolo Paolucci
777be8fba8
Add category on library.properties files
2015-10-31 17:20:08 +01:00
Thibaut VIARD
264a5a59e7
[zero/SPI] Adding default values for SPI custom definitions
2015-08-13 12:07:51 +02:00
Thibaut VIARD
6ec964dba1
[zero/SPI] adding missing library properties
2015-08-11 09:42:26 +02:00
Thibaut VIARD
7fbd66521e
[zero] Bring more customization to SPI class
2015-08-10 13:39:31 +02:00
Cristian Maglie
30f23fb9ac
Other license cleanup
2015-06-15 14:25:42 +02:00
Cristian Maglie
97f1cf6af5
Hide non-API pinPeripheral method
2015-06-15 14:16:15 +02:00
Cristian Maglie
e3a367f878
Fixed SPI datamode settings
...
The missing break in every case will have MODE0 always selected
2015-05-19 16:41:31 +02:00
Claudio Indellicati
cb722cfd06
Implemented SPI Transaction API.
2015-03-27 17:53:30 +01:00
Cristian Maglie
f0e76f9af8
SPI: fix indent
2014-10-28 15:20:22 +01:00
Cristian Maglie
eca1341c7b
Limit SPI max clock speed to 12Mhz
...
SAMD21G18A doesn't operate correctly with clock dividers lower than 4
2014-10-28 15:20:21 +01:00
Cristian Maglie
98341bfb82
Added SPI clock divisor for compatibility with legacy SPI library for AVR
2014-09-11 22:25:49 +02:00
Cristian Maglie
4206a3cd77
Simplified formula for SPI divisor calculation
2014-09-11 18:57:00 +02:00
Cristian Maglie
c7866bfce4
Added SPI block-transfer method
2014-09-11 18:45:11 +02:00
Cristian Maglie
29bc12e762
Added stub for SPI transactions
2014-09-11 18:45:11 +02:00
Thibaut VIARD
f1a8c8b140
Update pin numbers according to recent changes
...
Signed-off-by: Thibaut VIARD <thibaut.viard@atmel.com>
2014-09-11 16:39:21 +02:00
Cristian Maglie
adcfb53e96
Fixed includes in SPI library
2014-09-08 14:37:18 +02:00
Thibaut VIARD
ae42fd1167
Adding license in files, update platform.txt
2014-07-25 17:11:29 +02:00
Jonathan BAUDIN
280bc4e001
Fix SPI
2014-06-05 12:15:20 +02:00
Jonathan BAUDIN
8b1d9bfd27
SPI implement tested
2014-05-15 18:10:01 +02:00
Jonathan BAUDIN
e4ab3ba3ef
Few UART corrections, modifiy Variant files
2014-05-15 11:54:59 +02:00
Jonathan BAUDIN
07e782b2b1
Fix UART EDBG and baudrate
2014-05-12 20:37:59 +02:00
Jonathan BAUDIN
a8969bd183
Change SERCOM used by Wire
2014-05-07 17:26:48 +02:00
Jonathan BAUDIN
92d2f670f0
Creating objects SERCOMx, Serial, SPI and Wire.
2014-05-07 16:56:34 +02:00
Jonathan BAUDIN
7e75870756
Correction compilation errors.
2014-05-07 16:02:25 +02:00
Jonathan BAUDIN
1014ac90c1
Add txBuffer (ring buffer) to SercomUart.
...
Add SPI functions into SERCOM class and create SPI class
2014-04-28 15:49:42 +02:00
Jonathan BAUDIN
8fe524de16
Add function for Sercom SPI
2014-04-25 11:53:15 +02:00