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 221 of file conf_usb.h.

Referenced by usb_general_interrupt().

 
#define Usb_wake_up_action (  ) 

Definition at line 222 of file conf_usb.h.

Referenced by usb_general_interrupt().

 
#define Usb_resume_action (  ) 

Definition at line 223 of file conf_usb.h.

Referenced by usb_general_interrupt().

 
#define Usb_suspend_action (  )     nf_usb_stop()

Definition at line 224 of file conf_usb.h.

Referenced by usb_general_interrupt().

 
#define Usb_reset_action (  ) 

Definition at line 225 of file conf_usb.h.

Referenced by usb_general_interrupt().

 
#define Usb_vbus_on_action (  ) 

Definition at line 226 of file conf_usb.h.

Referenced by usb_device_task().

 
#define Usb_vbus_off_action (  )     nf_usb_stop()

Definition at line 227 of file conf_usb.h.

Referenced by usb_device_task().

 
#define Usb_set_configuration_action (  ) 

Definition at line 228 of file conf_usb.h.

Referenced by usb_set_configuration().

 
#define Scsi_start_read_action (  )     Led_ms_read_on()

Definition at line 242 of file conf_usb.h.

Referenced by scsi_decode_command().

 
#define Scsi_stop_read_action (  )     Led_ms_read_off()

Definition at line 243 of file conf_usb.h.

Referenced by scsi_decode_command().

 
#define Scsi_start_write_action (  )     Led_ms_write_on()

Definition at line 244 of file conf_usb.h.

Referenced by scsi_decode_command().

 
#define Scsi_stop_write_action (  )     Led_ms_write_off()

Definition at line 245 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 2053 of file nf_mngt.c.

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


Generated on Mon Sep 14 13:14:24 2009 for ATMEL by  doxygen 1.5.3