aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-05-10 19:24:58 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-05-10 19:24:58 +0000
commit359fbfe14d00ab378f85a36664820ea9ba538c3f (patch)
tree0929d5663a3be4dc078dda0aba5ba798ebb627ab /LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h
parente8570c4a37e41117e3fd1e989e0b41f1e9608f3c (diff)
downloadlufa-359fbfe14d00ab378f85a36664820ea9ba538c3f.tar.gz
lufa-359fbfe14d00ab378f85a36664820ea9ba538c3f.tar.bz2
lufa-359fbfe14d00ab378f85a36664820ea9ba538c3f.zip
Add branch for the conversion of demos to use standard C header files for configuration, rather than makefile defined macros.
Diffstat (limited to 'LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h')
-rw-r--r--LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h b/LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h
index 0126630ac..562aaecfd 100644
--- a/LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h
+++ b/LUFA/Drivers/Peripheral/AVR8/SerialSPI_AVR8.h
@@ -176,9 +176,7 @@
*/
static inline void SerialSPI_SendByte(const uint8_t DataByte)
{
- UDR1 = DataByte;
- while (!(UCSR1A & (1 << TXC1)));
- UCSR1A = (1 << TXC1);
+ SerialSPI_TransferByte(DataByte);
}
/** Sends a dummy byte through the USART SPI interface, blocking until the transfer is complete. The response
@@ -188,10 +186,7 @@
*/
static inline uint8_t SerialSPI_ReceiveByte(void)
{
- UDR1 = 0;
- while (!(UCSR1A & (1 << TXC1)));
- UCSR1A = (1 << TXC1);
- return UDR1;
+ return SerialSPI_TransferByte(0);
}
/* Disable C linkage for C++ Compilers: */