projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dataflash_WaitWhileBusy() now always ensures that the dataflash is ready for the...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
Peripheral
/
SPI.h
diff --git
a/LUFA/Drivers/Peripheral/SPI.h
b/LUFA/Drivers/Peripheral/SPI.h
index
4ada793
..
dc8661a
100644
(file)
--- a/
LUFA/Drivers/Peripheral/SPI.h
+++ b/
LUFA/Drivers/Peripheral/SPI.h
@@
-33,9
+33,14
@@
* Hardware SPI subsystem driver for the supported USB AVRs models.
\r
*/
\r
\r
* Hardware SPI subsystem driver for the supported USB AVRs models.
\r
*/
\r
\r
-/** \ingroup Group_
Subsystem
Drivers
\r
+/** \ingroup Group_
Peripheral
Drivers
\r
* @defgroup Group_SPI SPI Driver - LUFA/Drivers/Peripheral/SPI.h
\r
*
\r
* @defgroup Group_SPI SPI Driver - LUFA/Drivers/Peripheral/SPI.h
\r
*
\r
+ * \section Sec_Dependencies Module Source Dependencies
\r
+ * The following files must be built with any user project that uses this module:
\r
+ * - None
\r
+ *
\r
+ * \section Module Description
\r
* Functions, macros, variables, enums and types related to the setup of a the SPI port.
\r
*
\r
* @{
\r
* Functions, macros, variables, enums and types related to the setup of a the SPI port.
\r
*
\r
* @{
\r
@@
-85,8
+90,8
@@
/** Initializes the SPI subsystem, ready for transfers. Must be called before calling any other
\r
* SPI routines.
\r
*
\r
/** Initializes the SPI subsystem, ready for transfers. Must be called before calling any other
\r
* SPI routines.
\r
*
\r
- * \param PrescalerMask Prescaler mask to set the SPI clock speed
\r
- * \param Master If true, sets the SPI system to use master mode, slave if false
\r
+ * \param
[in]
PrescalerMask Prescaler mask to set the SPI clock speed
\r
+ * \param
[in]
Master If true, sets the SPI system to use master mode, slave if false
\r
*/
\r
static inline void SPI_Init(const uint8_t PrescalerMask, const bool Master)
\r
{
\r
*/
\r
static inline void SPI_Init(const uint8_t PrescalerMask, const bool Master)
\r
{
\r
@@
-97,12
+102,14
@@
(PrescalerMask & ~SPI_USE_DOUBLESPEED));
\r
\r
if (PrescalerMask & SPI_USE_DOUBLESPEED)
\r
(PrescalerMask & ~SPI_USE_DOUBLESPEED));
\r
\r
if (PrescalerMask & SPI_USE_DOUBLESPEED)
\r
- SPSR = (1 << SPI2X);
\r
+ SPSR |= (1 << SPI2X);
\r
+ else
\r
+ SPSR &= ~(1 << SPI2X);
\r
}
\r
\r
/** Sends and receives a byte through the SPI interface, blocking until the transfer is complete.
\r
*
\r
}
\r
\r
/** Sends and receives a byte through the SPI interface, blocking until the transfer is complete.
\r
*
\r
- * \param Byte Byte to send through the SPI interface
\r
+ * \param
[in]
Byte Byte to send through the SPI interface
\r
*
\r
* \return Response byte from the attached SPI device
\r
*/
\r
*
\r
* \return Response byte from the attached SPI device
\r
*/
\r
@@
-117,7
+124,7
@@
/** Sends a byte through the SPI interface, blocking until the transfer is complete. The response
\r
* byte sent to from the attached SPI device is ignored.
\r
*
\r
/** Sends a byte through the SPI interface, blocking until the transfer is complete. The response
\r
* byte sent to from the attached SPI device is ignored.
\r
*
\r
- * \param Byte Byte to send through the SPI interface
\r
+ * \param
[in]
Byte Byte to send through the SPI interface
\r
*/
\r
static inline void SPI_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
\r
static inline void SPI_SendByte(const uint8_t Byte)
\r
*/
\r
static inline void SPI_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
\r
static inline void SPI_SendByte(const uint8_t Byte)
\r