[tuxdroid-svn] r1168 - firmware/fuxusb/trunk/src
Status: Beta
Brought to you by:
ks156
From: Paul_R <c2m...@c2...> - 2008-05-16 14:06:06
|
Author: Paul_R Date: 2008-05-16 16:06:01 +0200 (Fri, 16 May 2008) New Revision: 1168 Modified: firmware/fuxusb/trunk/src/config.h firmware/fuxusb/trunk/src/fifo_mic.h firmware/fuxusb/trunk/src/fifo_spk.h firmware/fuxusb/trunk/src/fifo_stt.h firmware/fuxusb/trunk/src/global.h firmware/fuxusb/trunk/src/main.c firmware/fuxusb/trunk/src/usb_desc.h firmware/fuxusb/trunk/src/usb_enum.c firmware/fuxusb/trunk/src/usb_enum.h firmware/fuxusb/trunk/src/usb_task.c firmware/fuxusb/trunk/src/usb_task.h Log: * Added doxygen comments on usb_task and usb_enum. * Moved doxygen groups def. on global.h Modified: firmware/fuxusb/trunk/src/config.h =================================================================== --- firmware/fuxusb/trunk/src/config.h 2008-05-16 13:31:45 UTC (rev 1167) +++ firmware/fuxusb/trunk/src/config.h 2008-05-16 14:06:01 UTC (rev 1168) @@ -30,7 +30,7 @@ #include <stdio.h> /* Enable the HID interface */ -#define HID_DEVICE +//#define HID_DEVICE /* Debug modes : Don't forget to define MAIN_DEBUG to be able to use printf */ //#define MAIN_DEBUG Modified: firmware/fuxusb/trunk/src/fifo_mic.h =================================================================== --- firmware/fuxusb/trunk/src/fifo_mic.h 2008-05-16 13:31:45 UTC (rev 1167) +++ firmware/fuxusb/trunk/src/fifo_mic.h 2008-05-16 14:06:01 UTC (rev 1168) @@ -20,18 +20,6 @@ /* $Id$ */ -/** - * \defgroup fifo_mic Microphone FIFO. - \brief FIFO_MIC used for the microphone data, received from the RF and sent - to the computer. - - This FIFO are specific for this application and the context. - It's optimized for speed. It's not circular, and the access to the - buffer are direct. - - \ingroup fuxusb - */ - /** \file fifo_mic.h \brief Publics declaration for the microphone's fifo module. \ingroup fifo_mic Modified: firmware/fuxusb/trunk/src/fifo_spk.h =================================================================== --- firmware/fuxusb/trunk/src/fifo_spk.h 2008-05-16 13:31:45 UTC (rev 1167) +++ firmware/fuxusb/trunk/src/fifo_spk.h 2008-05-16 14:06:01 UTC (rev 1168) @@ -19,17 +19,7 @@ /* $Id$ */ -/** - * \defgroup fifo_spk Speaker FIFO. - \brief FIFO_SPK is used for the speaker data, received from the USB and sent - to the RF. - - This FIFO are specific for this application and the context. - It's optimized for speed. It's not circular, and the access to the - buffer are direct. - \ingroup fuxusb - */ /** \file fifo_spk.h \brief Publics declaration for the speaker's fifo module. Modified: firmware/fuxusb/trunk/src/fifo_stt.h =================================================================== --- firmware/fuxusb/trunk/src/fifo_stt.h 2008-05-16 13:31:45 UTC (rev 1167) +++ firmware/fuxusb/trunk/src/fifo_stt.h 2008-05-16 14:06:01 UTC (rev 1168) @@ -22,17 +22,7 @@ #ifndef _FIFO_STT_H_ #define _FIFO_STT_H_ -/** - * \defgroup fifo_stt Statuses FIFO. - \brief FIFO_STT is used for the statuses data, received from the RF and sent - to the computer. - - This FIFO are specific for this application and the context. - It's optimized for speed. It's not circular, and the access to the - buffer are direct. - \ingroup fuxusb - */ /** \file fifo_stt.h \brief Publics declaration for the microphone's fifo module. Modified: firmware/fuxusb/trunk/src/global.h =================================================================== --- firmware/fuxusb/trunk/src/global.h 2008-05-16 13:31:45 UTC (rev 1167) +++ firmware/fuxusb/trunk/src/global.h 2008-05-16 14:06:01 UTC (rev 1168) @@ -25,29 +25,69 @@ /** \defgroup fuxusb USB Dongle for TuxDroid. */ + /** \defgroup main Main function. + * \brief Fuxusb main function + * \ingroup fuxusb + */ + +/** + * \defgroup usb_task USB Task + \brief Main functions to control the USB bus. + + \ingroup fuxusb + */ +/** + * \defgroup usb_enum USB enumeration process + \brief This module analyse the enumeration requests and send back required + informations. + + \ingroup fuxusb + */ + /** \mainpage Fuxusb firmware documentation of the Tux Droid open source robot * * \section SVN SVN repository * http://svn.tuxisalive.com/firmware/fuxusb/trunk */ +/** + * \defgroup fifo_spk Speaker FIFO. + \brief FIFO_SPK is used for the speaker data, received from the USB and sent + to the RF. + + This FIFO are specific for this application and the context. + It's optimized for speed. It's not circular, and the access to the + buffer are direct. -/** \defgroup fifo Tux USB dongle FIFOs. + \ingroup fuxusb + */ - The dongle use three FIFOs : - - FIFO_MIC used for the microphone data, received from the RF and sent to the - computer - - FIFO_SPK used for the speaker data, received from the USB and sent to - Tux - - FIFO_STT used for the statuses +/** + * \defgroup fifo_mic Microphone FIFO. + \brief FIFO_MIC used for the microphone data, received from the RF and sent + to the computer. + + This FIFO are specific for this application and the context. + It's optimized for speed. It's not circular, and the access to the + buffer are direct. - These FIFOs are specific for this application and the context - They're optimized for speed - They're not circular, and the access to the buffers are direct - */ + \ingroup fuxusb + */ + /** + * \defgroup fifo_stt Status FIFO. + \brief FIFO_STT is used for the status data, received from the RF and sent + to the computer. + + This FIFO are specific for this application and the context. + It's optimized for speed. It's not circular, and the access to the + buffer are direct. + \ingroup fuxusb + */ + + #include "common\api.h" #include "common\defines.h" Modified: firmware/fuxusb/trunk/src/main.c =================================================================== --- firmware/fuxusb/trunk/src/main.c 2008-05-16 13:31:45 UTC (rev 1167) +++ firmware/fuxusb/trunk/src/main.c 2008-05-16 14:06:01 UTC (rev 1168) @@ -20,11 +20,8 @@ /* $Id$ */ -/** \defgroup main Main function. - * \brief Fuxusb main function - * \ingroup fuxusb - */ + /** \file main.c * \brief Fuxusb main function * \ingroup main Modified: firmware/fuxusb/trunk/src/usb_desc.h =================================================================== --- firmware/fuxusb/trunk/src/usb_desc.h 2008-05-16 13:31:45 UTC (rev 1167) +++ firmware/fuxusb/trunk/src/usb_desc.h 2008-05-16 14:06:01 UTC (rev 1168) @@ -33,6 +33,8 @@ #define INTERFACE 0x04 #define ENDPOINT 0x05 +/* HID specifics descriptors */ + /* Standard features*/ #define DEVICE_REMOTE_WAKEUP_FEATURE 0x01 #define ENDPOINT_HALT_FEATURE 0x00 Modified: firmware/fuxusb/trunk/src/usb_enum.c =================================================================== --- firmware/fuxusb/trunk/src/usb_enum.c 2008-05-16 13:31:45 UTC (rev 1167) +++ firmware/fuxusb/trunk/src/usb_enum.c 2008-05-16 14:06:01 UTC (rev 1168) @@ -19,6 +19,11 @@ /* $Id$ */ +/** \file usb_enum.c + \brief Function to control the enumeration process + * \ingroup usb_enum +*/ + #include "config.h" #include "global.h" #include "version.h" @@ -74,6 +79,7 @@ * \brief Init usb variables. * This function init the endpoints status, clear the configuration flag and * clear the Bank variables. + * \ingroup usb_enum */ void usb_var_init (void) { @@ -114,6 +120,7 @@ * \brief Enumeration process - main function. * This is the only one public function for the enumeration process. * The CONTROL EP is selected, and the request can be parsed. + * \ingroup usb_enum */ void usb_enumeration_process (void) { Modified: firmware/fuxusb/trunk/src/usb_enum.h =================================================================== --- firmware/fuxusb/trunk/src/usb_enum.h 2008-05-16 13:31:45 UTC (rev 1167) +++ firmware/fuxusb/trunk/src/usb_enum.h 2008-05-16 14:06:01 UTC (rev 1168) @@ -19,61 +19,108 @@ /* $Id$ */ + +/** \file usb_enum.h + \brief Specifics define forthe enumeration process and public defs. + \ingroup usb_enum +*/ + #ifndef _USB_ENUM_H_ #define _USB_ENUM_H_ -/* USB Standard request */ +/** \name USB Requests + * @{ */ + +/** \name USB Standard requests + * @{ */ +/** Get status request */ #define GET_STATUS 0x00 +/** Get device request */ #define GET_DEVICE 0x01 +/** Clear feature request */ #define CLEAR_FEATURE 0x01 /* see FEATURES below */ +/** Get string request */ #define GET_STRING 0x03 +/** Set feature request */ #define SET_FEATURE 0x03 /* see FEATURES below */ +/** Set address request */ #define SET_ADDRESS 0x05 +/** Get descriptor request */ #define GET_DESCRIPTOR 0x06 +/** Set descriptor request */ #define SET_DESCRIPTOR 0x07 +/** Get configuration request */ #define GET_CONFIGURATION 0x08 +/** Set configuration request */ #define SET_CONFIGURATION 0x09 +/** Get interface request */ #define GET_INTERFACE 0x0A +/** Set interface request */ #define SET_INTERFACE 0x0B +/** Synchro frame request */ #define SYNCH_FRAME 0x0C +/*! @} */ -/* HID specific */ +/** \name HID specific requests + * @{ */ +/** Set idle request */ #define HID_SET_IDLE 0x0A +/** Get idle request */ #define HID_GET_IDLE 0x02 +/*! @} */ -/* USB audio specific*/ +/** \name Audio specific requests + * @{ */ +/** Set current request */ #define SET_CURRENT 0x01 +/** Set min request */ #define SET_MIN 0x02 +/** Set max request */ #define SET_MAX 0x03 +/** Set resolution request */ #define SET_RES 0x04 +/** Get current request */ #define GET_CURRENT 0x81 +/** Get min request */ #define GET_MIN 0x82 +/** Get max request */ #define GET_MAX 0x83 +/** Get resolution request */ #define GET_RES 0x84 +/*! @} */ +/*! @} */ -#define GET_DEVICE_DESCRIPTOR 1 -#define GET_CONFIGURATION_DESCRIPTOR 4 - -/* HID specific */ -#define HID 0x21 -#define REPORT 0x22 - +/** \name Status requests + * @{ */ +/** Device status request */ #define REQUEST_DEVICE_STATUS 0x80 +/** Interface status request */ #define REQUEST_INTERFACE_STATUS 0x81 +/** Endpoint status request */ #define REQUEST_ENDPOINT_STATUS 0x82 +/*! @} */ +/** \name Set feature requests + * @{ */ +/** Zero type request */ #define ZERO_TYPE 0x00 +/** Interface type request */ #define INTERFACE_TYPE 0x01 +/** Endpoint type request */ #define ENDPOINT_TYPE 0x02 +/*! @} */ -/* MASKS */ +/** \name Misc - Masks + * @{ */ +/** Class mask */ #define CLASS_MK 0x60 +/** Standard request mask */ #define STANDARD 0x00 +/** Audio specific request mask */ #define AUDIO 0x20 -/*_____ D E C L A R A T I O N ______________________________________________*/ +/*! @} */ - void usb_var_init(void); void usb_ep_init(void); void usb_enumeration_process(void); Modified: firmware/fuxusb/trunk/src/usb_task.c =================================================================== --- firmware/fuxusb/trunk/src/usb_task.c 2008-05-16 13:31:45 UTC (rev 1167) +++ firmware/fuxusb/trunk/src/usb_task.c 2008-05-16 14:06:01 UTC (rev 1168) @@ -19,6 +19,12 @@ /* $Id$ */ +/** \file usb_task.c + \brief Main USB task. + This module control the USB bus. + \ingroup usb_task +*/ + #include "config.h" #include "global.h" #include "usb_task.h" @@ -29,6 +35,11 @@ #include "misc.h" #include "lib_mcu\usb\usb_drv.h" +/** + * \brief Init the USB task. + * This function init the USB communication. + * \ingroup usb_task + */ void usb_task_init(void) { configure_usb_clock(); @@ -46,7 +57,12 @@ Led_0_off(); } - +/** + * \brief Main USB function. + * This function parse the differents USB flags and registers bit, and determine + * which function must be executed. + * \ingroup usb_task + */ void usb_task(void) { if (Usb_resume()) Modified: firmware/fuxusb/trunk/src/usb_task.h =================================================================== --- firmware/fuxusb/trunk/src/usb_task.h 2008-05-16 13:31:45 UTC (rev 1167) +++ firmware/fuxusb/trunk/src/usb_task.h 2008-05-16 14:06:01 UTC (rev 1168) @@ -17,14 +17,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id:$ */ +/* $Id$ */ + + +/** \file usb_task.h + \brief Publics declaration for the usb_task module. + \ingroup usb_task +*/ + #ifndef _USB_TASK_H_ #define _USB_TASK_H_ - -#define UT_REQUESTED 0 -#define UT_BLANK 1 - extern uint8_t RF_Status; void usb_task_init(void); |