Modules | Defines | Functions

USB device operating mode configuration
[USB application configuration]

Modules

 USB device custom actions

Defines

#define USB_DEVICE_SN_USE   DISABLE
#define USE_DEVICE_SN_UNIQUE   DISABLE
#define EP_MOUSE_IN   1
#define USB_REMOTE_WAKEUP_FEATURE   ENABLE
#define USB_LOW_SPEED_DEVICE   ENABLE
#define USB_RESET_CPU   DISABLED
#define Usb_unicode(a)   ((U16)(a))

Functions

void sof_action (void)
 This function increments the SOF counter each times.
void suspend_action (void)
 This function enables switches interruptions and enters the CPU in power down mode.

Define Documentation

#define USB_DEVICE_SN_USE   DISABLE

Definition at line 90 of file conf_usb.h.

#define USE_DEVICE_SN_UNIQUE   DISABLE

Definition at line 91 of file conf_usb.h.

#define EP_MOUSE_IN   1

Definition at line 93 of file conf_usb.h.

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

#define USB_REMOTE_WAKEUP_FEATURE   ENABLE

Definition at line 95 of file conf_usb.h.

Referenced by usb_clear_feature(), and usb_set_feature().

#define USB_LOW_SPEED_DEVICE   ENABLE

Definition at line 97 of file conf_usb.h.

#define USB_RESET_CPU   DISABLED

Definition at line 99 of file conf_usb.h.

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

Definition at line 101 of file conf_usb.h.


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
//! 

Definition at line 250 of file mouse_task.c.

{
   g_u8_cpt_sof++;

}
void suspend_action ( void   )

This function enables switches interruptions and enters the CPU in power down mode.

//! This function is executed when a suspend is received.
//! 

Definition at line 277 of file mouse_task.c.

References ENABLED, Enter_power_down_mode, Led7_off, Led7_on, remote_wakeup_feature, and Switches_enable_it.

{
#if (USB_REMOTE_WAKEUP_FEATURE == ENABLED)
   if (remote_wakeup_feature == ENABLED)
   {
      Switches_enable_it();
   }
   Led7_off();
   Enable_interrupt();
   Enter_power_down_mode();
   Led7_on();
#endif
}