Collaboration diagram for USB device operating mode configuration:
![]() |
Modules | |
USB device custom actions | |
Defines | |
#define | NB_ENDPOINTS 4 |
#define | EP_MOUSE_IN 1 |
#define | EP_MS_IN 2 |
#define | EP_MS_OUT 3 |
#define | USB_REMOTE_WAKEUP 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) |
sof_action |
#define NB_ENDPOINTS 4 |
Definition at line 49 of file conf_usb.h.
#define EP_MOUSE_IN 1 |
Definition at line 50 of file conf_usb.h.
Referenced by mouse_task_by_IT(), and usb_user_endpoint_init().
#define EP_MS_IN 2 |
Definition at line 51 of file conf_usb.h.
Referenced by usb_mass_storage_cbw(), usb_mass_storage_csw(), and usb_user_endpoint_init().
#define EP_MS_OUT 3 |
Definition at line 52 of file conf_usb.h.
Referenced by storage_task(), usb_mass_storage_cbw(), usb_mass_storage_csw(), and usb_user_endpoint_init().
#define USB_REMOTE_WAKEUP DISABLED |
#define VBUS_SENSING_IO DISABLED |
Definition at line 56 of file conf_usb.h.
#define USB_RESET_CPU DISABLED |
Definition at line 58 of file conf_usb.h.
#define Usb_unicode | ( | a | ) | ((U16)(a)) |
Definition at line 60 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 | ( | ) |
sof_action
This function increments the cpt_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...)
none |
Definition at line 217 of file mouse_task.c.
00218 { 00219 U8 ep_selected; 00220 cpt_sof++; 00221 if (cpt_sof == NB_IDLE_POLLING_SOF) 00222 { 00223 ep_selected = Usb_get_selected_endpoint(); // the currently selected endpoint must be saved to avoid 00224 // problems when interrupt happens during mass storage endpoint reading/writing 00225 mouse_task_by_IT(); 00226 cpt_sof = 0; 00227 Usb_select_endpoint(ep_selected); // restore current selected endpoint 00228 } 00229 }