X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/d38fa49cb6cb3804c9bb17601688a62ba466b535..86e6ed7f31d29fa3d2aea1f6c40aa4647fce2690:/LUFA/Drivers/Peripheral/SPI.h diff --git a/LUFA/Drivers/Peripheral/SPI.h b/LUFA/Drivers/Peripheral/SPI.h index d8d60ede5..dc8661ad5 100644 --- a/LUFA/Drivers/Peripheral/SPI.h +++ b/LUFA/Drivers/Peripheral/SPI.h @@ -90,8 +90,8 @@ /** Initializes the SPI subsystem, ready for transfers. Must be called before calling any other * SPI routines. * - * \param PrescalerMask Prescaler mask to set the SPI clock speed - * \param Master If true, sets the SPI system to use master mode, slave if false + * \param[in] PrescalerMask Prescaler mask to set the SPI clock speed + * \param[in] Master If true, sets the SPI system to use master mode, slave if false */ static inline void SPI_Init(const uint8_t PrescalerMask, const bool Master) { @@ -102,12 +102,14 @@ (PrescalerMask & ~SPI_USE_DOUBLESPEED)); if (PrescalerMask & SPI_USE_DOUBLESPEED) - SPSR = (1 << SPI2X); + SPSR |= (1 << SPI2X); + else + SPSR &= ~(1 << SPI2X); } /** Sends and receives a byte through the SPI interface, blocking until the transfer is complete. * - * \param Byte Byte to send through the SPI interface + * \param[in] Byte Byte to send through the SPI interface * * \return Response byte from the attached SPI device */ @@ -122,7 +124,7 @@ /** Sends a byte through the SPI interface, blocking until the transfer is complete. The response * byte sent to from the attached SPI device is ignored. * - * \param Byte Byte to send through the SPI interface + * \param[in] Byte Byte to send through the SPI interface */ static inline void SPI_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE; static inline void SPI_SendByte(const uint8_t Byte)