diff options
author | Dean Camera <[email protected]> | 2009-04-16 08:50:34 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2009-04-16 08:50:34 +0000 |
commit | 8f6b4ddf764c3a54e42d00a7502c82c5c3e71b1c (patch) | |
tree | 65c37548f19c26de3971639067d6f290095f5843 /LUFA/Drivers/Board | |
parent | ef06bfd1c0ef5272c32808e23d0fd60d2d1bca9c (diff) | |
download | qmk_firmware-8f6b4ddf764c3a54e42d00a7502c82c5c3e71b1c.tar.gz qmk_firmware-8f6b4ddf764c3a54e42d00a7502c82c5c3e71b1c.zip |
Fixed GenericHIDHost demo report write routine incorrect for control type requests (thanks to Andrei Krainev).
Removed Endpoint_ClearCurrentBank() and Pipe_ClearCurrentBank() in favour of new Endpoint_ClearIN(), Endpoint_ClearOUT(), Endpoint_ClearControlIN(), Endpoint_ClearControlOUT(), Pipe_ClearIN(), Pipe_ClearOUT(), Pipe_ClearControlIN() and Pipe_ClearControlOUT() macros (done to allow for the detection of packets of zero length).
Renamed *_ReadWriteAllowed() macros to *_IsReadWriteAllowed() to remain consistent with the rest of the LUFA API.
Endpoint_IsSetupReceived() macro has been renamed to Endpoint_IsSETUPReceived(), Endpoint_ClearSetupReceived() macro has been renamed to Endpoint_ClearControlSETUP(), the Pipe_IsSetupSent() macro has been renamed to Pipe_IsSETUPSent() and the Pipe_ClearSetupSent() macro is no longer applicable and should be removed - changes made to compliment the new endpoint and pipe bank management API.
Updated all demos, bootloaders and projects to use the new endpoint and pipe management APIs (thanks to Roman Thiel).
Updated library doxygen documentation, added groups, changed documentation macro functions to real functions for clarity.
Removed old endpoint and pipe aliased read/write/discard routines which did not have an explicit endian specifier for clarity.
Removed the ButtLoadTag.h header file, as no one used for its intended purpose anyway.
Diffstat (limited to 'LUFA/Drivers/Board')
23 files changed, 238 insertions, 27 deletions
diff --git a/LUFA/Drivers/Board/ATAVRUSBRF01/HWB.h b/LUFA/Drivers/Board/ATAVRUSBRF01/HWB.h index edf4f8c50d..9d9982ba22 100644 --- a/LUFA/Drivers/Board/ATAVRUSBRF01/HWB.h +++ b/LUFA/Drivers/Board/ATAVRUSBRF01/HWB.h @@ -35,6 +35,12 @@ * \note This file should not be included directly. It is automatically included as needed by the HWB driver
* dispatch header located in LUFA/Drivers/Board/HWB.h.
*/
+
+/** \ingroup Group_HWB
+ * @defgroup Group_HWB_ATAVRUSBRF01 ATAVRUSBRF01
+ *
+ * @{
+ */
#ifndef __HWB_ATAVRUSBRF01_H__
#define __HWB_ATAVRUSBRF01_H__
@@ -77,3 +83,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h b/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h index 626d8cecf3..a073d2ef55 100644 --- a/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h +++ b/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h @@ -36,6 +36,12 @@ * dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
+/** \ingroup Group_LEDs
+ * @defgroup Group_LEDs_ATAVRUSBRF01 ATAVRUSBRF01
+ *
+ * @{
+ */
+
#ifndef __LEDS_ATAVRUSBRF01_H__
#define __LEDS_ATAVRUSBRF01_H__
@@ -118,3 +124,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/Dataflash.h b/LUFA/Drivers/Board/Dataflash.h index aa0c0892f1..4e61a6bce5 100644 --- a/LUFA/Drivers/Board/Dataflash.h +++ b/LUFA/Drivers/Board/Dataflash.h @@ -40,6 +40,14 @@ * directory.
*/
+/** \ingroup Group_BoardDrivers
+ * @defgroup Group_Dataflash Dataflash Driver - LUFA/Drivers/Board/Dataflash.h
+ *
+ * Functions, macros, variables, enums and types related to the control of board Dataflash ICs.
+ *
+ * @{
+ */
+
#ifndef __DATAFLASH_H__
#define __DATAFLASH_H__
@@ -59,21 +67,33 @@ #endif
/* Public Interface - May be used in end-application: */
- /* Macros: */
- /** Returns the mask of the currently selected Dataflash chip, either DATAFLASH_NO_CHIP or a
- * DATAFLASH_CHIPn mask (where n is the chip number).
- */
- #define Dataflash_GetSelectedChip() (DATAFLASH_CHIPCS_PORT & DATAFLASH_CHIPCS_MASK)
+ /* Psuedo-Function Macros: */
+ #if defined(__DOXYGEN__)
+ /** Determines the currently selected dataflash chip.
+ *
+ * \return Mask of the currently selected Dataflash chip, either DATAFLASH_NO_CHIP if no chip is selected
+ * or a DATAFLASH_CHIPn mask (where n is the chip number).
+ */
+ static inline uint8_t Dataflash_GetSelectedChip(void);
+
+ /** Selects the given dataflash chip.
+ *
+ * \param ChipMask Mask of the Dataflash IC to select, in the form of DATAFLASH_CHIPn mask (where n is
+ * the chip number).
+ */
+ static inline void Dataflash_SelectChip(uint8_t ChipMask);
+
+ /** Deselects the current dataflash chip, so that no dataflash is selected. */
+ static inline void Dataflash_DeselectChip(void);
+ #else
+ #define Dataflash_GetSelectedChip() (DATAFLASH_CHIPCS_PORT & DATAFLASH_CHIPCS_MASK)
- /** Selects the dataflash chip given as a chip mask, in the form of DATAFLASH_CHIPn (where n
- * is the chip number).
- */
- #define Dataflash_SelectChip(mask) MACROS{ DATAFLASH_CHIPCS_PORT = ((DATAFLASH_CHIPCS_PORT \
- & ~DATAFLASH_CHIPCS_MASK) | mask); }MACROE
+ #define Dataflash_SelectChip(mask) MACROS{ DATAFLASH_CHIPCS_PORT = ((DATAFLASH_CHIPCS_PORT \
+ & ~DATAFLASH_CHIPCS_MASK) | mask); }MACROE
+
+ #define Dataflash_DeselectChip() Dataflash_SelectChip(DATAFLASH_NO_CHIP)
+ #endif
- /** Deselects the current dataflash chip, so that no dataflash is selected. */
- #define Dataflash_DeselectChip() Dataflash_SelectChip(DATAFLASH_NO_CHIP)
-
/* Inline Functions: */
/** Sends a byte to the currently selected dataflash IC, and returns a byte from the dataflash.
*
@@ -182,3 +202,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/HWB.h b/LUFA/Drivers/Board/HWB.h index 6ad2fa821b..049fd2378d 100644 --- a/LUFA/Drivers/Board/HWB.h +++ b/LUFA/Drivers/Board/HWB.h @@ -39,7 +39,15 @@ * If the BOARD value is set to BOARD_USER, this will include the /Board/HWB.h file in the user project
* directory.
*/
-
+
+/** \ingroup Group_BoardDrivers
+ * @defgroup Group_HWB HWB Driver - LUFA/Drivers/Board/HWB.h
+ *
+ * Functions, macros, variables, enums and types related to the control of board HWB.
+ *
+ * @{
+ */
+
#ifndef __HWB_H__
#define __HWB_H__
@@ -85,3 +93,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/Joystick.h b/LUFA/Drivers/Board/Joystick.h index a3f70b8a45..86a02cfe72 100644 --- a/LUFA/Drivers/Board/Joystick.h +++ b/LUFA/Drivers/Board/Joystick.h @@ -40,6 +40,14 @@ * directory.
*/
+/** \ingroup Group_BoardDrivers
+ * @defgroup Group_Joystick Joystick Driver - LUFA/Drivers/Board/Joystick.h
+ *
+ * Functions, macros, variables, enums and types related to the control of board joystick.
+ *
+ * @{
+ */
+
#ifndef __JOYSTICK_H__
#define __JOYSTICK_H__
@@ -83,3 +91,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/LEDs.h b/LUFA/Drivers/Board/LEDs.h index 03e0db5e84..c40042ddc9 100644 --- a/LUFA/Drivers/Board/LEDs.h +++ b/LUFA/Drivers/Board/LEDs.h @@ -39,7 +39,15 @@ * If the BOARD value is set to BOARD_USER, this will include the /Board/LEDs.h file in the user project
* directory.
*/
-
+
+/** \ingroup Group_BoardDrivers
+ * @defgroup Group_LEDs LEDs Driver - LUFA/Drivers/Board/LEDs.h
+ *
+ * Functions, macros, variables, enums and types related to the control of board LEDs.
+ *
+ * @{
+ */
+
#ifndef __LEDS_H__
#define __LEDS_H__
@@ -111,3 +119,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h b/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h index 38cbed0cff..24977ea5e5 100644 --- a/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h +++ b/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h @@ -35,6 +35,12 @@ * \note This file should not be included directly. It is automatically included as needed by the LEDs driver
* dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
+
+/** \ingroup Group_LEDs
+ * @defgroup Group_LEDs_RZUSBSTICK RZUSBSTICK
+ *
+ * @{
+ */
#ifndef __LEDS_RZUSBSTICK_H__
#define __LEDS_RZUSBSTICK_H__
@@ -139,3 +145,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/STK525/AT45DB321C.h b/LUFA/Drivers/Board/STK525/AT45DB321C.h index ac29967e6b..6879c10355 100644 --- a/LUFA/Drivers/Board/STK525/AT45DB321C.h +++ b/LUFA/Drivers/Board/STK525/AT45DB321C.h @@ -36,6 +36,12 @@ * dispatch header located in LUFA/Drivers/Board/Dataflash.h.
*/
+/** \ingroup Group_Dataflash_STK525
+ * @defgroup Group_Dataflash_STK525_AT45DB321C AT45DB321C
+ *
+ * @{
+ */
+
#ifndef __DATAFLASH_CMDS_H__
#define __DATAFLASH_CMDS_H__
@@ -82,3 +88,5 @@ #define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/STK525/Dataflash.h b/LUFA/Drivers/Board/STK525/Dataflash.h index e4e2f52371..b2ea1b8e9e 100644 --- a/LUFA/Drivers/Board/STK525/Dataflash.h +++ b/LUFA/Drivers/Board/STK525/Dataflash.h @@ -36,6 +36,12 @@ * dispatch header located in LUFA/Drivers/Board/Dataflash.h.
*/
+/** \ingroup Group_Dataflash
+ * @defgroup Group_Dataflash_STK525 STK525
+ *
+ * @{
+ */
+
#ifndef __DATAFLASH_STK525_H__
#define __DATAFLASH_STK525_H__
@@ -106,3 +112,5 @@ }
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/STK525/HWB.h b/LUFA/Drivers/Board/STK525/HWB.h index a0ff72de13..a91890cd35 100644 --- a/LUFA/Drivers/Board/STK525/HWB.h +++ b/LUFA/Drivers/Board/STK525/HWB.h @@ -35,7 +35,13 @@ * \note This file should not be included directly. It is automatically included as needed by the HWB driver
* dispatch header located in LUFA/Drivers/Board/HWB.h.
*/
-
+
+/** \ingroup Group_HWB
+ * @defgroup Group_HWB_STK525 STK525
+ *
+ * @{
+ */
+
#ifndef __HWB_STK525_H__
#define __HWB_STK525_H__
@@ -77,3 +83,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/STK525/Joystick.h b/LUFA/Drivers/Board/STK525/Joystick.h index 58aed4f80d..b74655ecae 100644 --- a/LUFA/Drivers/Board/STK525/Joystick.h +++ b/LUFA/Drivers/Board/STK525/Joystick.h @@ -36,6 +36,12 @@ * dispatch header located in LUFA/Drivers/Board/Joystick.h.
*/
+/** \ingroup Group_Joystick
+ * @defgroup Group_Joystick_STK525 STK525
+ *
+ * @{
+ */
+
#ifndef __JOYSTICK_STK525_H__
#define __JOYSTICK_STK525_H__
@@ -102,3 +108,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/STK525/LEDs.h b/LUFA/Drivers/Board/STK525/LEDs.h index 13f626c2b0..a769f16d08 100644 --- a/LUFA/Drivers/Board/STK525/LEDs.h +++ b/LUFA/Drivers/Board/STK525/LEDs.h @@ -35,6 +35,12 @@ * \note This file should not be included directly. It is automatically included as needed by the LEDs driver
* dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
+
+/** \ingroup Group_LEDs
+ * @defgroup Group_LEDs_STK525 STK525
+ *
+ * @{
+ */
#ifndef __LEDS_STK525_H__
#define __LEDS_STK525_H__
@@ -115,3 +121,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/STK526/AT45DB642D.h b/LUFA/Drivers/Board/STK526/AT45DB642D.h index dd38ed1dfe..d6974659fc 100644 --- a/LUFA/Drivers/Board/STK526/AT45DB642D.h +++ b/LUFA/Drivers/Board/STK526/AT45DB642D.h @@ -36,6 +36,12 @@ * dispatch header located in LUFA/Drivers/Board/Dataflash.h.
*/
+/** \ingroup Group_Dataflash_STK526
+ * @defgroup Group_Dataflash_STK526_AT45DB642D AT45DB642D
+ *
+ * @{
+ */
+
#ifndef __DATAFLASH_CMDS_H__
#define __DATAFLASH_CMDS_H__
@@ -92,3 +98,5 @@ #define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/STK526/Dataflash.h b/LUFA/Drivers/Board/STK526/Dataflash.h index 443c1a754d..65c5e202cd 100644 --- a/LUFA/Drivers/Board/STK526/Dataflash.h +++ b/LUFA/Drivers/Board/STK526/Dataflash.h @@ -36,6 +36,12 @@ * dispatch header located in LUFA/Drivers/Board/Dataflash.h.
*/
+/** \ingroup Group_Dataflash
+ * @defgroup Group_Dataflash_STK526 STK526
+ *
+ * @{
+ */
+
#ifndef __DATAFLASH_STK526_H__
#define __DATAFLASH_STK526_H__
@@ -106,3 +112,5 @@ }
#endif
+ +/** @} */
diff --git a/LUFA/Drivers/Board/STK526/HWB.h b/LUFA/Drivers/Board/STK526/HWB.h index 3bd2f9952f..0d4fd7e03d 100644 --- a/LUFA/Drivers/Board/STK526/HWB.h +++ b/LUFA/Drivers/Board/STK526/HWB.h @@ -35,7 +35,13 @@ * \note This file should not be included directly. It is automatically included as needed by the HWB driver
* dispatch header located in LUFA/Drivers/Board/HWB.h.
*/
-
+
+/** \ingroup Group_HWB
+ * @defgroup Group_HWB_STK526 STK526
+ *
+ * @{
+ */
+
#ifndef __HWB_STK526_H__
#define __HWB_STK526_H__
@@ -77,3 +83,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/STK526/Joystick.h b/LUFA/Drivers/Board/STK526/Joystick.h index e5cd2e47c6..c15b21284c 100644 --- a/LUFA/Drivers/Board/STK526/Joystick.h +++ b/LUFA/Drivers/Board/STK526/Joystick.h @@ -35,6 +35,12 @@ * \note This file should not be included directly. It is automatically included as needed by the joystick driver
* dispatch header located in LUFA/Drivers/Board/Joystick.h.
*/
+
+/** \ingroup Group_Joystick
+ * @defgroup Group_Joystick_STK526 STK526
+ *
+ * @{
+ */
#ifndef __JOYSTICK_STK526_H__
#define __JOYSTICK_STK526_H__
@@ -99,3 +105,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/STK526/LEDs.h b/LUFA/Drivers/Board/STK526/LEDs.h index fc88a57339..6b17ab1c8c 100644 --- a/LUFA/Drivers/Board/STK526/LEDs.h +++ b/LUFA/Drivers/Board/STK526/LEDs.h @@ -35,6 +35,12 @@ * \note This file should not be included directly. It is automatically included as needed by the LEDs driver
* dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
+
+/** \ingroup Group_LEDs
+ * @defgroup Group_LEDs_STK526 STK526
+ *
+ * @{
+ */
#ifndef __LEDS_STK526_H__
#define __LEDS_STK526_H__
@@ -115,3 +121,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/Temperature.h b/LUFA/Drivers/Board/Temperature.h index 17b8acfe15..6e1827edd0 100644 --- a/LUFA/Drivers/Board/Temperature.h +++ b/LUFA/Drivers/Board/Temperature.h @@ -33,6 +33,14 @@ * Temperature sensor board driver for the USB boards which contain a temperature sensor.
*/
+/** \ingroup Group_BoardDrivers
+ * @defgroup Group_Temperature Temperature Driver - LUFA/Drivers/Board/Temperature.h
+ *
+ * Functions, macros, variables, enums and types related to the control of board temperature sensors.
+ *
+ * @{
+ */
+
#ifndef __TEMPERATURE_H__
#define __TEMPERATURE_H__
@@ -68,14 +76,19 @@ /** Maximum returnable temperature from the Temperature_GetTemperature() function. */
#define TEMP_MAX_TEMP ((TEMP_TABLE_SIZE - 1) + TEMP_TABLE_OFFSET)
-
- /** Initializes the temperature sensor driver, including setting up the appropriate ADC channel.
- * This must be called before any other temperature sensor routines.
- *
- * The ADC itself (not the ADC channel) must be configured separately before calling the temperature
- * sensor functions.
- */
- #define Temperature_Init() ADC_SetupChannel(TEMP_ADC_CHANNEL);
+
+ /* Psuedo-Functions: */
+ #if defined(__DOXYGEN__)
+ /** Initializes the temperature sensor driver, including setting up the appropriate ADC channel.
+ * This must be called before any other temperature sensor routines.
+ *
+ * The ADC itself (not the ADC channel) must be configured separately before calling the temperature
+ * sensor functions.
+ */
+ static inline void Temperature_Init(void);
+ #else
+ #define Temperature_Init() ADC_SetupChannel(TEMP_ADC_CHANNEL);
+ #endif
/* Function Prototypes: */
/** Performs a complete ADC on the temperature sensor channel, and converts the result into a
@@ -98,3 +111,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/USBKEY/AT45DB642D.h b/LUFA/Drivers/Board/USBKEY/AT45DB642D.h index 197be1c618..672dd7c3d7 100644 --- a/LUFA/Drivers/Board/USBKEY/AT45DB642D.h +++ b/LUFA/Drivers/Board/USBKEY/AT45DB642D.h @@ -36,6 +36,12 @@ * dispatch header located in LUFA/Drivers/Board/Dataflash.h.
*/
+/** \ingroup Group_Dataflash_USBKEY
+ * @defgroup Group_Dataflash_USBKEY_AT45DB642D AT45DB642D
+ *
+ * @{
+ */
+
#ifndef __DATAFLASH_CMDS_H__
#define __DATAFLASH_CMDS_H__
@@ -92,3 +98,5 @@ #define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/USBKEY/Dataflash.h b/LUFA/Drivers/Board/USBKEY/Dataflash.h index 2b3956f04d..cae62fd490 100644 --- a/LUFA/Drivers/Board/USBKEY/Dataflash.h +++ b/LUFA/Drivers/Board/USBKEY/Dataflash.h @@ -36,6 +36,12 @@ * dispatch header located in LUFA/Drivers/Board/Dataflash.h.
*/
+/** \ingroup Group_Dataflash
+ * @defgroup Group_Dataflash_USBKEY USBKEY
+ *
+ * @{
+ */
+
#ifndef __DATAFLASH_USBKEY_H__
#define __DATAFLASH_USBKEY_H__
@@ -114,3 +120,5 @@ }
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/USBKEY/HWB.h b/LUFA/Drivers/Board/USBKEY/HWB.h index 750368b19a..bfbaa4940c 100644 --- a/LUFA/Drivers/Board/USBKEY/HWB.h +++ b/LUFA/Drivers/Board/USBKEY/HWB.h @@ -35,7 +35,13 @@ * \note This file should not be included directly. It is automatically included as needed by the HWB driver
* dispatch header located in LUFA/Drivers/Board/HWB.h.
*/
-
+
+/** \ingroup Group_HWB
+ * @defgroup Group_HWB_USBKEY USBKEY
+ *
+ * @{
+ */
+
#ifndef __HWB_USBKEY_H__
#define __HWB_USBKEY_H__
@@ -77,3 +83,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/USBKEY/Joystick.h b/LUFA/Drivers/Board/USBKEY/Joystick.h index 6c2d72aee5..332dd56a30 100644 --- a/LUFA/Drivers/Board/USBKEY/Joystick.h +++ b/LUFA/Drivers/Board/USBKEY/Joystick.h @@ -35,7 +35,13 @@ * \note This file should not be included directly. It is automatically included as needed by the joystick driver
* dispatch header located in LUFA/Drivers/Board/Joystick.h.
*/
-
+
+/** \ingroup Group_Joystick
+ * @defgroup Group_Joystick_USBKEY USBKEY
+ *
+ * @{
+ */
+
#ifndef __JOYSTICK_USBKEY_H__
#define __JOYSTICK_USBKEY_H__
@@ -102,3 +108,5 @@ #endif
#endif
+
+/** @} */
diff --git a/LUFA/Drivers/Board/USBKEY/LEDs.h b/LUFA/Drivers/Board/USBKEY/LEDs.h index 07a2b7501a..68df3172f4 100644 --- a/LUFA/Drivers/Board/USBKEY/LEDs.h +++ b/LUFA/Drivers/Board/USBKEY/LEDs.h @@ -36,6 +36,12 @@ * dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
+/** \ingroup Group_LEDs
+ * @defgroup Group_LEDs_USBKEY USBKEY
+ *
+ * @{
+ */
+
#ifndef __LEDS_USBKEY_H__
#define __LEDS_USBKEY_H__
@@ -115,3 +121,5 @@ #endif
#endif
+
+/** @} */
|