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 NB_ENDPOINTS   2
#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 172 of file conf_usb.h.

#define USE_DEVICE_SN_UNIQUE   DISABLE

Definition at line 173 of file conf_usb.h.

#define NB_ENDPOINTS   2

Definition at line 175 of file conf_usb.h.

#define EP_MOUSE_IN   1

Definition at line 176 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 179 of file conf_usb.h.

#define USB_REMOTE_WAKEUP_FEATURE   ENABLE

Definition at line 181 of file conf_usb.h.

Referenced by usb_clear_feature(), and usb_set_feature().

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

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

00266 {
00267    g_u8_cpt_sof++;
00268 }

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.

00278 {
00279 #if (USB_REMOTE_WAKEUP_FEATURE == ENABLED)
00280    if (remote_wakeup_feature == ENABLED)
00281    {
00282       Switches_enable_it();
00283    }
00284    Led1_off();
00285    Enable_interrupt();
00286    Enter_power_down_mode();
00287    Led1_on();
00288 #endif 
00289 } 

void vbus_off_action ( void   ) 

void mouse_task_init ( void   ) 

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

Definition at line 118 of file mouse_task.c.

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


Generated on Fri Oct 31 14:47:09 2008 for ATMEL by  doxygen 1.5.3