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_LOW_SPEED_DEVICE   DISABLE
 The USB device speed mode (default DISABLE to get full speed connection).
#define USB_REMOTE_WAKEUP_FEATURE   ENABLE
#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.
void vbus_off_action (void)
void mouse_task_init (void)
 This function initializes the hardware/software resources required for mouse task.

Define Documentation

#define USB_DEVICE_SN_USE   DISABLE

Definition at line 175 of file conf_usb.h.

#define USE_DEVICE_SN_UNIQUE   DISABLE

Definition at line 176 of file conf_usb.h.

#define EP_MOUSE_IN   1

Definition at line 178 of file conf_usb.h.

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

#define USB_LOW_SPEED_DEVICE   DISABLE

The USB device speed mode (default DISABLE to get full speed connection).

Definition at line 181 of file conf_usb.h.

#define USB_REMOTE_WAKEUP_FEATURE   ENABLE

Definition at line 183 of file conf_usb.h.

Referenced by usb_clear_feature(), and usb_set_feature().

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

Definition at line 185 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 272 of file mouse_task.c.

00273 {
00274    g_u8_cpt_sof++;
00275 }

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 284 of file mouse_task.c.

00285 {
00286 #if (USB_REMOTE_WAKEUP_FEATURE == ENABLED)
00287    if (remote_wakeup_feature == ENABLED)
00288    {
00289       Switches_enable_it();
00290    }
00291    Led1_off();
00292    Enable_interrupt();
00293    Enter_power_down_mode();
00294    Led1_on();
00295 #endif 
00296 } 

void vbus_off_action ( void   ) 

void mouse_task_init ( void   ) 

This function initializes the hardware/software resources required for mouse task.

Definition at line 121 of file mouse_task.c.

00122 {
00123    // Init SOF
00124    g_u8_cpt_sof=0;
00125    Usb_enable_sof_interrupt();
00126 
00127    // Init interface board
00128    Joy_init();
00129    Hwb_button_init();
00130    Leds_init();
00131    Led1_on();
00132    Led0_off();
00133 #if (TARGET_BOARD==STK525)
00134    init_adc();
00135    g_u16_pos_scroll=Get_adc_pot_val();
00136 #endif
00137    
00138    // Send a ack report at startup
00139    g_b_send_report      = FALSE;
00140    g_b_send_ack_report  = TRUE;
00141 }


Generated on Mon Sep 14 13:21:28 2009 for ATMEL by  doxygen 1.5.3