Pārlūkot izejas kodu

Turning on the PUSHR_CONT removes gap

Experiment with making the whole transfer of the buffer act like it is
to logically hold the CS pins for that whole transfer.  This removes
gaps between each 16 bit transfer.
main
Kurt Eckhardt pirms 8 gadiem
vecāks
revīzija
9ea3dd95e6
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. +4
    -1
      SPI.cpp

+ 4
- 1
SPI.cpp Parādīt failu

@@ -347,7 +347,10 @@ void SPIClass::transfer(void *buf, size_t count) {
// Push out the next byte;
uint16_t w = (*p_write++) << 8;
w |= *p_write++;
KINETISK_SPI0.PUSHR = w | SPI_PUSHR_CTAS(1);
if (count == 2)
KINETISK_SPI0.PUSHR = w | SPI_PUSHR_CTAS(1);
else
KINETISK_SPI0.PUSHR = w | SPI_PUSHR_CONT | SPI_PUSHR_CTAS(1);
count -= 2; // how many bytes to output.
// Make sure queue is not full before pushing next byte out
do {

Notiek ielāde…
Atcelt
Saglabāt