diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-02-22 12:36:08 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-02-22 12:36:08 +0000 |
commit | 99a45fa97d741fed0b630d1a04f3b78f93967654 (patch) | |
tree | 8a46644969c6ce91bafe6d81ae97a4938544a56e /LUFA/Drivers/Peripheral/AVR8/Serial.h | |
parent | ff8e0ea2d62687017b6cd700f7c3fe66c78c5647 (diff) | |
download | lufa-99a45fa97d741fed0b630d1a04f3b78f93967654.tar.gz lufa-99a45fa97d741fed0b630d1a04f3b78f93967654.tar.bz2 lufa-99a45fa97d741fed0b630d1a04f3b78f93967654.zip |
Add start of an AVR32 SPI driver.
Diffstat (limited to 'LUFA/Drivers/Peripheral/AVR8/Serial.h')
-rw-r--r-- | LUFA/Drivers/Peripheral/AVR8/Serial.h | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/LUFA/Drivers/Peripheral/AVR8/Serial.h b/LUFA/Drivers/Peripheral/AVR8/Serial.h index 0421dea73..282528bb0 100644 --- a/LUFA/Drivers/Peripheral/AVR8/Serial.h +++ b/LUFA/Drivers/Peripheral/AVR8/Serial.h @@ -80,7 +80,7 @@ */
static inline bool Serial_IsCharReceived(void);
#else
- #define Serial_IsCharReceived() ((UCSR1A & (1 << RXC1)) ? true : false)
+ #define Serial_IsCharReceived() /* TODO */
#endif
/* Inline Functions: */
@@ -92,27 +92,13 @@ */
static inline void Serial_Init(const uint32_t BaudRate, const bool DoubleSpeed)
{
- UCSR1A = (DoubleSpeed ? (1 << U2X1) : 0);
- UCSR1B = ((1 << TXEN1) | (1 << RXEN1));
- UCSR1C = ((1 << UCSZ11) | (1 << UCSZ10));
-
- DDRD |= (1 << 3);
- PORTD |= (1 << 2);
-
- UBRR1 = (DoubleSpeed ? SERIAL_2X_UBBRVAL(BaudRate) : SERIAL_UBBRVAL(BaudRate));
+ // TODO
}
/** Turns off the USART driver, disabling and returning used hardware to their default configuration. */
static inline void Serial_ShutDown(void)
{
- UCSR1A = 0;
- UCSR1B = 0;
- UCSR1C = 0;
-
- DDRD &= ~(1 << 3);
- PORTD &= ~(1 << 2);
-
- UBRR1 = 0;
+ // TODO
}
/** Transmits a given byte through the USART.
@@ -121,8 +107,7 @@ */
static inline void Serial_TxByte(const char DataByte)
{
- while (!(UCSR1A & (1 << UDRE1)));
- UDR1 = DataByte;
+ // TODO
}
/** Receives a byte from the USART.
@@ -131,8 +116,7 @@ */
static inline uint8_t Serial_RxByte(void)
{
- while (!(UCSR1A & (1 << RXC1)));
- return UDR1;
+ // TODO
}
/* Disable C linkage for C++ Compilers: */
|