projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix TWI driver not aborting when faced with no response after attempting to address...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
LowLevel
/
Pipe.h
diff --git
a/LUFA/Drivers/USB/LowLevel/Pipe.h
b/LUFA/Drivers/USB/LowLevel/Pipe.h
index
08935e1
..
c22c5ae
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/Pipe.h
+++ b/
LUFA/Drivers/USB/LowLevel/Pipe.h
@@
-74,16
+74,10
@@
#define __PIPE_H__
\r
\r
/* Includes: */
\r
#define __PIPE_H__
\r
\r
/* Includes: */
\r
- #if defined(__AVR32__)
\r
- #include <avr32/io.h>
\r
- #include <stdint.h>
\r
- #include <stdbool.h>
\r
- #elif defined(__AVR__)
\r
- #include <avr/io.h>
\r
- #include <avr/pgmspace.h>
\r
- #include <avr/eeprom.h>
\r
- #include <stdbool.h>
\r
- #endif
\r
+ #include <avr/io.h>
\r
+ #include <avr/pgmspace.h>
\r
+ #include <avr/eeprom.h>
\r
+ #include <stdbool.h>
\r
\r
#include "../../../Common/Common.h"
\r
#include "../HighLevel/USBTask.h"
\r
\r
#include "../../../Common/Common.h"
\r
#include "../HighLevel/USBTask.h"
\r
@@
-99,7
+93,7
@@
\r
/* Preprocessor Checks: */
\r
#if !defined(__INCLUDE_FROM_USB_DRIVER)
\r
\r
/* Preprocessor Checks: */
\r
#if !defined(__INCLUDE_FROM_USB_DRIVER)
\r
- #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
\r
+ #error Do not include this file directly. Include LUFA/Drivers/USB
/USB
.h instead.
\r
#endif
\r
\r
/* Public Interface - May be used in end-application: */
\r
#endif
\r
\r
/* Public Interface - May be used in end-application: */
\r
@@
-553,11
+547,7
@@
static inline uint8_t Pipe_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
\r
static inline uint8_t Pipe_Read_Byte(void)
\r
{
\r
static inline uint8_t Pipe_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
\r
static inline uint8_t Pipe_Read_Byte(void)
\r
{
\r
- #if defined(__AVR32__)
\r
- return 0; // TODO
\r
- #elif defined(__AVR__)
\r
return UPDATX;
\r
return UPDATX;
\r
- #endif
\r
}
\r
\r
/** Writes one byte from the currently selected pipe's bank, for IN direction pipes.
\r
}
\r
\r
/** Writes one byte from the currently selected pipe's bank, for IN direction pipes.
\r
@@
-569,11
+559,7
@@
static inline void Pipe_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
\r
static inline void Pipe_Write_Byte(const uint8_t Byte)
\r
{
\r
static inline void Pipe_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
\r
static inline void Pipe_Write_Byte(const uint8_t Byte)
\r
{
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
UPDATX = Byte;
\r
UPDATX = Byte;
\r
- #endif
\r
}
\r
\r
/** Discards one byte from the currently selected pipe's bank, for OUT direction pipes.
\r
}
\r
\r
/** Discards one byte from the currently selected pipe's bank, for OUT direction pipes.
\r
@@
-585,11
+571,7
@@
{
\r
uint8_t Dummy;
\r
\r
{
\r
uint8_t Dummy;
\r
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
Dummy = UPDATX;
\r
Dummy = UPDATX;
\r
- #endif
\r
}
\r
\r
/** Reads two bytes from the currently selected pipe's bank in little endian format, for OUT
\r
}
\r
\r
/** Reads two bytes from the currently selected pipe's bank in little endian format, for OUT
\r
@@
-608,12
+590,8
@@
uint8_t Bytes[2];
\r
} Data;
\r
\r
uint8_t Bytes[2];
\r
} Data;
\r
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
Data.Bytes[0] = UPDATX;
\r
Data.Bytes[1] = UPDATX;
\r
Data.Bytes[0] = UPDATX;
\r
Data.Bytes[1] = UPDATX;
\r
- #endif
\r
\r
return Data.Word;
\r
}
\r
\r
return Data.Word;
\r
}
\r
@@
-634,12
+612,8
@@
uint8_t Bytes[2];
\r
} Data;
\r
\r
uint8_t Bytes[2];
\r
} Data;
\r
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
Data.Bytes[1] = UPDATX;
\r
Data.Bytes[0] = UPDATX;
\r
Data.Bytes[1] = UPDATX;
\r
Data.Bytes[0] = UPDATX;
\r
- #endif
\r
\r
return Data.Word;
\r
}
\r
\r
return Data.Word;
\r
}
\r
@@
-654,12
+628,8
@@
static inline void Pipe_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE;
\r
static inline void Pipe_Write_Word_LE(const uint16_t Word)
\r
{
\r
static inline void Pipe_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE;
\r
static inline void Pipe_Write_Word_LE(const uint16_t Word)
\r
{
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
UPDATX = (Word & 0xFF);
\r
UPDATX = (Word >> 8);
\r
UPDATX = (Word & 0xFF);
\r
UPDATX = (Word >> 8);
\r
- #endif
\r
}
\r
\r
/** Writes two bytes to the currently selected pipe's bank in big endian format, for IN
\r
}
\r
\r
/** Writes two bytes to the currently selected pipe's bank in big endian format, for IN
\r
@@
-672,12
+642,8
@@
static inline void Pipe_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE;
\r
static inline void Pipe_Write_Word_BE(const uint16_t Word)
\r
{
\r
static inline void Pipe_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE;
\r
static inline void Pipe_Write_Word_BE(const uint16_t Word)
\r
{
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
UPDATX = (Word >> 8);
\r
UPDATX = (Word & 0xFF);
\r
UPDATX = (Word >> 8);
\r
UPDATX = (Word & 0xFF);
\r
- #endif
\r
}
\r
\r
/** Discards two bytes from the currently selected pipe's bank, for OUT direction pipes.
\r
}
\r
\r
/** Discards two bytes from the currently selected pipe's bank, for OUT direction pipes.
\r
@@
-689,12
+655,8
@@
{
\r
uint8_t Dummy;
\r
\r
{
\r
uint8_t Dummy;
\r
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
Dummy = UPDATX;
\r
Dummy = UPDATX;
\r
Dummy = UPDATX;
\r
Dummy = UPDATX;
\r
- #endif
\r
}
\r
\r
/** Reads four bytes from the currently selected pipe's bank in little endian format, for OUT
\r
}
\r
\r
/** Reads four bytes from the currently selected pipe's bank in little endian format, for OUT
\r
@@
-713,14
+675,10
@@
uint8_t Bytes[4];
\r
} Data;
\r
\r
uint8_t Bytes[4];
\r
} Data;
\r
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
Data.Bytes[0] = UPDATX;
\r
Data.Bytes[1] = UPDATX;
\r
Data.Bytes[2] = UPDATX;
\r
Data.Bytes[3] = UPDATX;
\r
Data.Bytes[0] = UPDATX;
\r
Data.Bytes[1] = UPDATX;
\r
Data.Bytes[2] = UPDATX;
\r
Data.Bytes[3] = UPDATX;
\r
- #endif
\r
\r
return Data.DWord;
\r
}
\r
\r
return Data.DWord;
\r
}
\r
@@
-741,9
+699,6
@@
uint8_t Bytes[4];
\r
} Data;
\r
\r
uint8_t Bytes[4];
\r
} Data;
\r
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
Data.Bytes[3] = UPDATX;
\r
Data.Bytes[2] = UPDATX;
\r
Data.Bytes[1] = UPDATX;
\r
Data.Bytes[3] = UPDATX;
\r
Data.Bytes[2] = UPDATX;
\r
Data.Bytes[1] = UPDATX;
\r
@@
-762,14
+717,10
@@
static inline void Pipe_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
\r
static inline void Pipe_Write_DWord_LE(const uint32_t DWord)
\r
{
\r
static inline void Pipe_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
\r
static inline void Pipe_Write_DWord_LE(const uint32_t DWord)
\r
{
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
UPDATX = (DWord & 0xFF);
\r
UPDATX = (DWord >> 8);
\r
UPDATX = (DWord >> 16);
\r
UPDATX = (DWord >> 24);
\r
UPDATX = (DWord & 0xFF);
\r
UPDATX = (DWord >> 8);
\r
UPDATX = (DWord >> 16);
\r
UPDATX = (DWord >> 24);
\r
- #endif
\r
}
\r
\r
/** Writes four bytes to the currently selected pipe's bank in big endian format, for IN
\r
}
\r
\r
/** Writes four bytes to the currently selected pipe's bank in big endian format, for IN
\r
@@
-782,14
+733,10
@@
static inline void Pipe_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
\r
static inline void Pipe_Write_DWord_BE(const uint32_t DWord)
\r
{
\r
static inline void Pipe_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
\r
static inline void Pipe_Write_DWord_BE(const uint32_t DWord)
\r
{
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
UPDATX = (DWord >> 24);
\r
UPDATX = (DWord >> 16);
\r
UPDATX = (DWord >> 8);
\r
UPDATX = (DWord & 0xFF);
\r
UPDATX = (DWord >> 24);
\r
UPDATX = (DWord >> 16);
\r
UPDATX = (DWord >> 8);
\r
UPDATX = (DWord & 0xFF);
\r
- #endif
\r
}
\r
\r
/** Discards four bytes from the currently selected pipe's bank, for OUT direction pipes.
\r
}
\r
\r
/** Discards four bytes from the currently selected pipe's bank, for OUT direction pipes.
\r
@@
-801,14
+748,10
@@
{
\r
uint8_t Dummy;
\r
\r
{
\r
uint8_t Dummy;
\r
\r
- #if defined(__AVR32__)
\r
- // TODO
\r
- #elif defined(__AVR__)
\r
Dummy = UPDATX;
\r
Dummy = UPDATX;
\r
Dummy = UPDATX;
\r
Dummy = UPDATX;
\r
Dummy = UPDATX;
\r
Dummy = UPDATX;
\r
Dummy = UPDATX;
\r
Dummy = UPDATX;
\r
- #endif
\r
}
\r
\r
/* External Variables: */
\r
}
\r
\r
/* External Variables: */
\r