* FASTSPI_READ_RAM_LE(p,a,c,n) for completeness.
This commit is contained in:
parent
3de6d787c9
commit
670f414594
1 changed files with 13 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/* -*- C -*- */
|
||||
/* @(#)$Id: spi.h,v 1.1 2006/06/17 22:41:17 adamdunkels Exp $ */
|
||||
/* @(#)$Id: spi.h,v 1.2 2006/09/26 15:48:01 bg- Exp $ */
|
||||
|
||||
#ifndef SPI_H
|
||||
#define SPI_H
|
||||
|
@ -210,4 +210,16 @@ void spi_init(void);
|
|||
SPI_DISABLE();\
|
||||
} while (0)
|
||||
|
||||
#define FASTSPI_READ_RAM_LE(p,a,c,n)\
|
||||
do {\
|
||||
SPI_ENABLE();\
|
||||
FASTSPI_TX(0x80 | (a & 0x7F));\
|
||||
FASTSPI_TX(((a >> 1) & 0xC0) | 0x20);\
|
||||
SPI_RXBUF;\
|
||||
for (n = 0; n < (c); n++) {\
|
||||
FASTSPI_RX(((u8_t*)(p))[n]);\
|
||||
}\
|
||||
SPI_DISABLE();\
|
||||
} while (0)
|
||||
|
||||
#endif /* SPI_H */
|
||||
|
|
Loading…
Reference in a new issue