76 PROCESS(usb_process,
"USB process");
78 #ifndef USE_USB_PADS_REGULATOR
79 #error "USE_USB_PADS_REGULATOR" should be defined as ENABLE or DISABLE in conf_usb.h file
81 #include <avr/sleep.h>
86 #define LOG_STR_CODE(str)
88 U8 code log_device_disconnect[]=
"Device Disconnected";
89 U8 code log_id_change[]=
"Pin Id Change";
92 #define USB_EVENT 0x2F
136 set_sleep_mode(SLEEP_MODE_PWR_DOWN);
153 Usb_unfreeze_clock();
154 Usb_enable_vbus_interrupt();
167 static void pollhandler(
void)
177 if (schedule_interrupt) {
201 schedule_interrupt = 0;
227 #if (USE_USB_PADS_REGULATOR==ENABLE) // Otherwise assume USB PADs regulator is not used
238 #if (USB_LOW_SPEED_DEVICE==ENABLE)
241 Usb_enable_vbus_interrupt();
257 Usb_vbus_on_action();
300 if (Is_usb_vbus_transition() && Is_usb_vbus_interrupt_enabled())
302 Usb_ack_vbus_transition();
303 if (Is_usb_vbus_high())
306 Usb_vbus_on_action();
314 Usb_vbus_off_action();
321 if (
Is_usb_sof() && Is_sof_interrupt_enabled())
334 Usb_suspend_action();
339 Usb_unfreeze_clock();
342 Usb_wake_up_action();