USB device custom actions
[USB device operating mode configurationUSB application configuration]


Defines

#define Usb_sof_action()
#define Usb_wake_up_action()
#define Usb_resume_action()
#define Usb_suspend_action()   nf_usb_stop()
#define Usb_reset_action()
#define Usb_vbus_on_action()
#define Usb_vbus_off_action()   nf_usb_stop()
#define Usb_set_configuration_action()
#define Scsi_start_read_action()   Led_ms_read_on()
#define Scsi_stop_read_action()   Led_ms_read_off()
#define Scsi_start_write_action()   Led_ms_write_on()
#define Scsi_stop_write_action()   Led_ms_write_off()

Functions

void nf_usb_stop (void)
 This function perform a last copy tail if required, when USB enters suspend or is disconnected This function may be declared in "conf_usb.h" for "Usb_suspend_action()" and "Usb_vbus_off_action()" /!\ "g_last_log_sector" must be initialized to "0xFFFFFFFF" at startup to avoid spurious writes on during USB plug-in.

Define Documentation

 
#define Usb_sof_action (  ) 

Definition at line 219 of file conf_usb.h.

Referenced by usb_general_interrupt().

 
#define Usb_wake_up_action (  ) 

Definition at line 220 of file conf_usb.h.

Referenced by usb_general_interrupt().

 
#define Usb_resume_action (  ) 

Definition at line 221 of file conf_usb.h.

Referenced by usb_general_interrupt().

 
#define Usb_suspend_action (  )     nf_usb_stop()

Definition at line 222 of file conf_usb.h.

Referenced by usb_general_interrupt().

 
#define Usb_reset_action (  ) 

Definition at line 223 of file conf_usb.h.

Referenced by usb_general_interrupt().

 
#define Usb_vbus_on_action (  ) 

Definition at line 224 of file conf_usb.h.

Referenced by usb_device_task().

 
#define Usb_vbus_off_action (  )     nf_usb_stop()

Definition at line 225 of file conf_usb.h.

Referenced by usb_device_task().

 
#define Usb_set_configuration_action (  ) 

Definition at line 226 of file conf_usb.h.

Referenced by usb_set_configuration().

 
#define Scsi_start_read_action (  )     Led_ms_read_on()

Definition at line 240 of file conf_usb.h.

Referenced by scsi_decode_command().

 
#define Scsi_stop_read_action (  )     Led_ms_read_off()

Definition at line 241 of file conf_usb.h.

Referenced by scsi_decode_command().

 
#define Scsi_start_write_action (  )     Led_ms_write_on()

Definition at line 242 of file conf_usb.h.

Referenced by scsi_decode_command().

 
#define Scsi_stop_write_action (  )     Led_ms_write_off()

Definition at line 243 of file conf_usb.h.

Referenced by scsi_decode_command().


Function Documentation

void nf_usb_stop ( void   ) 

This function perform a last copy tail if required, when USB enters suspend or is disconnected This function may be declared in "conf_usb.h" for "Usb_suspend_action()" and "Usb_vbus_off_action()" /!\ "g_last_log_sector" must be initialized to "0xFFFFFFFF" at startup to avoid spurious writes on during USB plug-in.

=> Don't forget to eject (windows) the peripheral from the PC before unpluggin it to avoid uncomplete writing (FAT not actualized)

Parameters:
none 
Returns:
none

Definition at line 2050 of file nf_mngt.c.

02051 {
02052 #if (NF_XMCR_MODULE_SHARED == ENABLED)
02053    nf_XMCR_enable();
02054 #endif
02055 
02056    if ( 0xFFFFFFFF!=g_last_log_sector )
02057    {
02058       Nf_access_signal_on();
02059       nf_copy_tail();
02060 
02061       if ( TRUE==g_cache_lut.ctrl.dirty )
02062       { 
02063          nf_cache_lut_flush();
02064          nf_cache_lut_refill(0);
02065       }
02066       if ( TRUE==g_cache_fbb.ctrl.dirty )
02067       {
02068          nf_cache_fbb_flush( FALSE );
02069          nf_cache_fbb_refill();
02070       }
02071       Nf_access_signal_off();
02072    }
02073 
02074 #if (NF_XMCR_MODULE_SHARED == ENABLED)
02075    nf_XMCR_disable();
02076 #endif
02077 }


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