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 236 of file conf_usb.h.

#define USE_DEVICE_SN_UNIQUE   DISABLE

Definition at line 237 of file conf_usb.h.

#define EP_MOUSE_IN   1

Definition at line 239 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 240 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 241 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 242 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 243 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 245 of file conf_usb.h.

#define USB_REMOTE_WAKEUP_FEATURE   DISABLE

Definition at line 247 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 260 of file device_mouse_task.c.

00261 {
00262    U8 ep_selected;
00263    g_u16_cpt2_sof++;
00264    g_u8_cpt_sof++;
00265    if (g_u8_cpt_sof == NB_IDLE_POLLING_SOF)
00266    {
00267      ep_selected = Usb_get_selected_endpoint();   // the currently selected endpoint must be saved to avoid
00268                                                   // problems when interrupt happens during mass storage endpoint reading/writing
00269      device_mouse_task_by_IT();
00270      g_u8_cpt_sof = 0;
00271      Usb_select_endpoint(ep_selected);            // restore current selected endpoint
00272    }
00273 }


Generated on Wed Sep 23 09:33:32 2009 for ATMEL by  doxygen 1.5.3