projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix find name function. Pass as argument to cgi callback the rx buffer len.
[bertos.git]
/
bertos
/
cpu
/
arm
/
drv
/
spi_dma_at91.c
diff --git
a/bertos/cpu/arm/drv/spi_dma_at91.c
b/bertos/cpu/arm/drv/spi_dma_at91.c
index c4cbf2da70a37b288ddf9fa63ce484577d3c5e3a..57ed2fbd7203365246ff10cdf8da67e99c0a41e7 100644
(file)
--- a/
bertos/cpu/arm/drv/spi_dma_at91.c
+++ b/
bertos/cpu/arm/drv/spi_dma_at91.c
@@
-36,14
+36,17
@@
* \author Luca Ottaviano <lottaviano@develer.com>
*/
* \author Luca Ottaviano <lottaviano@develer.com>
*/
-#include
"cfg/cfg_spi_dma.h"
+#include
<drv/spi_dma.h>
-#include "
spi_dma_at91
.h"
+#include "
cfg/cfg_spi_dma
.h"
#include "hw/hw_spi_dma.h"
#include "hw/hw_spi_dma.h"
+#include <io/at91sam7.h>
#include <io/kfile.h>
#include <io/kfile.h>
+
#include <struct/fifobuf.h>
#include <struct/kfile_fifo.h>
#include <struct/fifobuf.h>
#include <struct/kfile_fifo.h>
+
#include <drv/timer.h>
#include <cpu/attr.h>
#include <drv/timer.h>
#include <cpu/attr.h>
@@
-129,7
+132,7
@@
static size_t spi_dma_read(UNUSED_ARG(struct KFile *, fd), void *_buf, size_t si
#define SPI_DMA_IRQ_PRIORITY 4
#define SPI_DMA_IRQ_PRIORITY 4
-void spi_dma_init(SpiDma
At91
*spi)
+void spi_dma_init(SpiDma *spi)
{
/* Disable PIO on SPI pins */
PIOA_PDR = BV(SPI0_SPCK) | BV(SPI0_MOSI) | BV(SPI0_MISO);
{
/* Disable PIO on SPI pins */
PIOA_PDR = BV(SPI0_SPCK) | BV(SPI0_MOSI) | BV(SPI0_MISO);
@@
-158,7
+161,7
@@
void spi_dma_init(SpiDmaAt91 *spi)
/* Enable SPI */
SPI0_CR = BV(SPI_SPIEN);
/* Enable SPI */
SPI0_CR = BV(SPI_SPIEN);
- DB(spi->fd._type = KFT_SPIDMA
AT91
);
+ DB(spi->fd._type = KFT_SPIDMA);
spi->fd.write = spi_dma_write;
spi->fd.read = spi_dma_read;
spi->fd.flush = spi_dma_flush;
spi->fd.write = spi_dma_write;
spi->fd.read = spi_dma_read;
spi->fd.flush = spi_dma_flush;