Modules | |
| USB device custom actions | |
Defines | |
| #define | USB_DEVICE_SN_USE ENABLE |
| #define | USE_DEVICE_SN_UNIQUE DISABLE |
| #define | NB_ENDPOINTS 4 |
| #define | EP_MOUSE_IN 1 |
| #define | EP_MS_IN 2 |
| #define | EP_MS_OUT 3 |
| #define | USB_REMOTE_WAKEUP_FEATURE DISABLED |
| #define | VBUS_SENSING_IO DISABLED |
| #define | USB_RESET_CPU DISABLED |
| #define | Usb_unicode(a) ((U16)(a)) |
| #define | Scsi_start_read_action() Led1_on() |
| #define | Scsi_stop_read_action() Led1_off() |
| #define | Scsi_start_write_action() Led0_on() |
| #define | Scsi_stop_write_action() Led0_off() |
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 USB_DEVICE_SN_USE ENABLE |
Definition at line 81 of file conf_usb.h.
| #define USE_DEVICE_SN_UNIQUE DISABLE |
Definition at line 82 of file conf_usb.h.
| #define NB_ENDPOINTS 4 |
Definition at line 84 of file conf_usb.h.
| #define EP_MOUSE_IN 1 |
Definition at line 85 of file conf_usb.h.
Referenced by mouse_task_by_IT(), usb_user_endpoint_init(), and usb_user_interface_reset().
| #define EP_MS_IN 2 |
Definition at line 86 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 87 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 USB_REMOTE_WAKEUP_FEATURE DISABLED |
| #define VBUS_SENSING_IO DISABLED |
Definition at line 91 of file conf_usb.h.
| #define USB_RESET_CPU DISABLED |
Definition at line 93 of file conf_usb.h.
| #define Usb_unicode | ( | a | ) | ((U16)(a)) |
Definition at line 95 of file conf_usb.h.
| #define Scsi_start_read_action | ( | ) | Led1_on() |
| #define Scsi_stop_read_action | ( | ) | Led1_off() |
| #define Scsi_start_write_action | ( | ) | Led0_on() |
| #define Scsi_stop_write_action | ( | ) | Led0_off() |
| 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 256 of file mouse_task.c.
00257 { 00258 U8 ep_selected; 00259 g_u8_cpt_sof++; 00260 if (g_u8_cpt_sof == NB_IDLE_POLLING_SOF) 00261 { 00262 ep_selected = Usb_get_selected_endpoint(); // the currently selected endpoint must be saved to avoid 00263 // problems when interrupt happens during mass storage endpoint reading/writing 00264 mouse_task_by_IT(); 00265 g_u8_cpt_sof = 0; 00266 Usb_select_endpoint(ep_selected); // restore current selected endpoint 00267 } 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 }
1.5.3