X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/27461546523862a3a76ee41f615f7ec2eed2195f..27eb17cb934dcd3807bacdfe87f853e32f0cfdb4:/LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h diff --git a/LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h b/LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h index 0247668dc..990b44d14 100644 --- a/LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h +++ b/LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h @@ -29,6 +29,7 @@ */ /** \file + * \brief TWI peripheral driver for the U7, U6 and U4 USB AVRs. * * Master mode TWI driver for the AT90USB1287, AT90USB1286, AT90USB647, AT90USB646, ATMEGA16U4 and ATMEGA32U4 AVRs. * @@ -39,6 +40,11 @@ /** \ingroup Group_TWI * @defgroup Group_TWI_AVRU4U6U7 Series U4, U6 and U7 Model TWI Driver * + * Master mode TWI driver for the AT90USB1287, AT90USB1286, AT90USB647, AT90USB646, ATMEGA16U4 and ATMEGA32U4 AVRs. + * + * \note This file should not be included directly. It is automatically included as needed by the TWI driver + * dispatch header located in LUFA/Drivers/Peripheral/TWI.h. + * * @{ */ @@ -51,6 +57,7 @@ #include #include #include + #include /* Enable C linkage for C++ Compilers: */ #if defined(__cplusplus) @@ -58,7 +65,7 @@ #endif /* Preprocessor Checks: */ - #if !defined(INCLUDE_FROM_TWI_H) + #if !defined(__INCLUDE_FROM_TWI_H) #error Do not include this file directly. Include LUFA/Drivers/Peripheral/TWI.h instead. #endif @@ -88,7 +95,7 @@ /** Sends a byte to the currently addressed device on the TWI bus. * - * \param Byte Byte to send to the currently addressed device + * \param[in] Byte Byte to send to the currently addressed device * * \return Boolean true if the recipient ACKed the byte, false otherwise */ @@ -103,8 +110,8 @@ /** Receives a byte from the currently addressed device on the TWI bus. * - * \param Byte Location where the read byte is to be stored - * \param LastByte Indicates if the byte should be ACKed if false, NAKed if true + * \param[in] Byte Location where the read byte is to be stored + * \param[in] LastByte Indicates if the byte should be ACKed if false, NAKed if true * * \return Boolean true if the byte reception sucessfully completed, false otherwise */ @@ -125,11 +132,12 @@ /* Function Prototypes: */ /** Begins a master mode TWI bus communication with the given slave device address. * - * \param SlaveAddress Address of the slave TWI device to communicate with + * \param[in] SlaveAddress Address of the slave TWI device to communicate with + * \param[in] TimeoutMS Timeout period within which the slave must respond, in milliseconds * * \return Boolean true if the device is ready for data, false otherwise */ - bool TWI_StartTransmission(uint8_t SlaveAddress); + bool TWI_StartTransmission(uint8_t SlaveAddress, uint8_t TimeoutMS); /* Disable C linkage for C++ Compilers: */ #if defined(__cplusplus)