X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/1daa5e16f9a395fb2943906a715adb35b8106988..bcc45e24aa6cac11ca93c1b2ccafa795aa2e3eb2:/LUFA/Drivers/USB/Core/USBTask.h diff --git a/LUFA/Drivers/USB/Core/USBTask.h b/LUFA/Drivers/USB/Core/USBTask.h index b5cf381aa..f040246c7 100644 --- a/LUFA/Drivers/USB/Core/USBTask.h +++ b/LUFA/Drivers/USB/Core/USBTask.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2011. + Copyright (C) Dean Camera, 2012. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -43,11 +43,11 @@ /* Includes: */ #include "../../../Common/Common.h" + #include "USBMode.h" #include "USBController.h" #include "Events.h" #include "StdRequestType.h" #include "StdDescriptors.h" - #include "USBMode.h" #if defined(USB_CAN_BE_DEVICE) #include "DeviceStandardReq.h" @@ -73,17 +73,19 @@ * or device (i.e. if \ref USB_Init() has been run). If this is false, all other library globals related * to the USB driver are invalid. * - * \note This variable should be treated as read-only in the user application, and never manually - * changed in value. + * \attention This variable should be treated as read-only in the user application, and never manually + * changed in value. * * \ingroup Group_USBManagement */ extern volatile bool USB_IsInitialized; /** Structure containing the last received Control request when in Device mode (for use in user-applications - * inside of the \ref EVENT_USB_Device_ControlRequest() event, or for filling up with a control request to + * inside of the \ref EVENT_USB_Device_ControlRequest() event, or for filling up with a control request to * issue when in Host mode before calling \ref USB_Host_SendControlRequest(). * + * \note The contents of this structure is automatically endian-corrected for the current CPU architecture. + * * \ingroup Group_USBManagement */ extern USB_Request_Header_t USB_ControlRequest; @@ -93,13 +95,12 @@ /** Indicates the current host state machine state. When in host mode, this indicates the state * via one of the values of the \ref USB_Host_States_t enum values. * - * This value may be altered by the user application to implement the \ref HOST_STATE_Addressed, - * \ref HOST_STATE_Configured and \ref HOST_STATE_Suspended states which are not implemented by - * the library internally. + * This value should not be altered by the user application as it is handled automatically by the + * library. * * To reduce program size and speed up checks of this global on the AVR8 architecture, it can be - * placed into one of the AVR's GPIOR hardware registers instead of RAM by defining the - * HOST_STATE_AS_GPIOR token to a value between 0 and 2 in the project makefile and passing it to + * placed into one of the AVR's \c GPIOR hardware registers instead of RAM by defining the + * \c HOST_STATE_AS_GPIOR token to a value between 0 and 2 in the project makefile and passing it to * the compiler via the -D switch. When defined, the corresponding GPIOR register should not be used * in the user application except implicitly via the library APIs. * @@ -127,17 +128,17 @@ * (see \ref EVENT_USB_Device_Connect() and \ref EVENT_USB_Device_Disconnect() events). * * To reduce program size and speed up checks of this global on the AVR8 architecture, it can be - * placed into one of the AVR's GPIOR hardware registers instead of RAM by defining the - * DEVICE_STATE_AS_GPIOR token to a value between 0 and 2 in the project makefile and passing it to + * placed into one of the AVR's \c GPIOR hardware registers instead of RAM by defining the + * \c DEVICE_STATE_AS_GPIOR token to a value between 0 and 2 in the project makefile and passing it to * the compiler via the -D switch. When defined, the corresponding GPIOR register should not be used * in the user application except implicitly via the library APIs. * + * \attention This variable should be treated as read-only in the user application, and never manually + * changed in value except in the circumstances outlined above. + * * \note This global is only present if the user application can be a USB device. * \n\n * - * \note This variable should be treated as read-only in the user application, and never manually - * changed in value except in the circumstances outlined above. - * * \see \ref USB_Device_States_t for a list of possible device states. * * \ingroup Group_Device @@ -191,7 +192,7 @@ /* Macros: */ #define HOST_TASK_NONBLOCK_WAIT(Duration, NextState) MACROS{ USB_HostState = HOST_STATE_WaitForDevice; \ WaitMSRemaining = (Duration); \ - PostWaitState = (NextState); }MACROE + PostWaitState = (NextState); }MACROE #endif /* Disable C linkage for C++ Compilers: */