USB device operating mode configuration
[USB application configuration]


Modules

 USB device custom actions

Defines

#define USB_DEVICE_SN_USE   ENABLE
#define USE_DEVICE_SN_UNIQUE   DISABLE
#define EP_MOUSE_IN   1
#define EP_MS_IN   2
#define EP_MS_OUT   3
#define EP_HID_IN   4
#define EP_HID_OUT   5
#define Usb_unicode(a)   ((U16)(a))
#define USB_REMOTE_WAKEUP_FEATURE   DISABLE

Functions

void sof_action (void)
 This function increments the SOF counter each times.

Define Documentation

#define USB_DEVICE_SN_USE   ENABLE

Definition at line 229 of file conf_usb.h.

#define USE_DEVICE_SN_UNIQUE   DISABLE

Definition at line 230 of file conf_usb.h.

#define EP_MOUSE_IN   1

Definition at line 232 of file conf_usb.h.

Referenced by device_mouse_task_by_IT(), usb_user_endpoint_init(), and usb_user_interface_reset().

#define EP_MS_IN   2

Definition at line 233 of file conf_usb.h.

Referenced by usb_mass_storage_cbw(), usb_mass_storage_csw(), usb_user_endpoint_init(), and usb_user_interface_reset().

#define EP_MS_OUT   3

Definition at line 234 of file conf_usb.h.

Referenced by storage_task(), usb_mass_storage_cbw(), usb_mass_storage_csw(), usb_user_endpoint_init(), and usb_user_interface_reset().

#define EP_HID_IN   4

Definition at line 235 of file conf_usb.h.

Referenced by hid_report_in(), usb_user_endpoint_init(), and usb_user_interface_reset().

#define EP_HID_OUT   5

Definition at line 236 of file conf_usb.h.

Referenced by hid_report_out(), usb_user_endpoint_init(), and usb_user_interface_reset().

#define Usb_unicode (  )     ((U16)(a))

Definition at line 238 of file conf_usb.h.

#define USB_REMOTE_WAKEUP_FEATURE   DISABLE

Definition at line 240 of file conf_usb.h.

Referenced by usb_clear_feature(), and usb_set_feature().


Function Documentation

void sof_action (  ) 

This function increments the SOF counter each times.

//! The USB Start Of Frame interrupt subroutine is executed (1ms).
//! Usefull to manage time delays.
//! Periodically this ISR calls the mouse_task_by_IT() function that ensure
//! the mouse operation in any circumstances (mass storage access, etc...)
//! 

Definition at line 245 of file device_mouse_task.c.

00246 {
00247    U8 ep_selected;
00248    g_u16_cpt2_sof++;
00249    g_u8_cpt_sof++;
00250    if (g_u8_cpt_sof == NB_IDLE_POLLING_SOF)
00251    {
00252      ep_selected = Usb_get_selected_endpoint();   // the currently selected endpoint must be saved to avoid
00253                                                   // problems when interrupt happens during mass storage endpoint reading/writing
00254      device_mouse_task_by_IT();
00255      g_u8_cpt_sof = 0;
00256      Usb_select_endpoint(ep_selected);            // restore current selected endpoint
00257    }
00258 }


Generated on Wed Sep 23 09:49:45 2009 for ATMEL by  doxygen 1.5.3