void configManagerRestoreDefaults( void ) 
{
#ifdef ChineseTTS
	configManagerReadSessionData(0);
#else

    CONF_DEBUG(("CO: Restore Defaults\n")) ;
    /*Set local values*/
	theHeadset.gVolButtonsInverted = FALSE ;
    
    theHeadset.tts_language = FALSE ;
    theHeadset.MultipointEnable = FALSE ;
#ifdef ENABLE_ENERGY_FILTER
    theHeadset.iir_enabled = FALSE  ;
#endif

#ifdef T3ProductionTest
	theHeadset.ProductionData = 0;
#else
	theHeadset.lbipmEnable = FALSE ;
#endif
    
	/*Reset PSKEYS*/
	(void)PsStore ( PSKEY_VOLUME_ORIENTATION , 0 , 0 ) ;
    
	/*Call function to reset the PDL*/
	configManagerReset();
	
#ifdef ROM_LEDS
	if	(!(theHeadset.theLEDTask->gLEDSEnabled))
	{
		/*Enable the LEDs*/
		MessageSend (&theHeadset.task , EventEnableLEDS , 0) ;
	}
#endif
#endif
}
Exemple #2
0
void configManagerInit( void )  
{ 
    
	/* use a memory allocation for the lengths data to reduce stack usage */
    lengths_config_type * keyLengths = mallocPanic(sizeof(lengths_config_type));
	
		/* Read key lengths */
    configManagerKeyLengths(keyLengths);			

        /* Allocate the memory required for the configuration data */
    InitConfigMemory(keyLengths);
    
  	    /* Read and configure the button translations */
  	configManagerButtonTranslations( );

        /* Read and configure the button durations */
  	configManagerButtonDurations( );
	
  	    /* Read the system event configuration and configure the buttons */
    configManagerButtons( );
    
    /*configures the pattern button events*/
    configManagerButtonPatterns( ) ;

        /*Read and configure the event tones*/
    configManagerEventTones( keyLengths->no_tones ) ;
        /* Read and configure the system features */
  	configManagerFeatureBlock( );	
                                                        
    /* Read and configure the automatic switch off time*/
    configManagerConfiguration( );

    /* Must happen between features and session data... */
    InitA2dp();  
 
    /* Read and configure the user defined tones */    
  	configManagerUserDefinedTones( keyLengths->userTonesLength );	

  	    /* Read and configure the LEDs */
    configManagerLEDS();
   
        /* Read and configure the voume settings */
  	configManagerVolume( );
 
  	    /* Read and configure the power management system */
  	configManagerPower( );
 
  	    /* Read and configure the radio parameters */
  	configManagerRadio();
   
        /* Read and configure the volume orientation, LED Disable state, and tts_language */
	configManagerReadSessionData ( ) ; 

    configManagerReadDspData();
	
        /* Read and configure the sniff sub-rate parameters */
	configManagerSetupSsr ( ) ; 
	
    configManagerEventTTSPhrases( keyLengths->no_tts ) ;

    configManagerVoicePromptsInit( keyLengths->no_vp , keyLengths->no_tts_languages );
 
#if defined (ENABLE_REMOTE) && defined (ENABLE_SOUNDBAR)
    /* Read the hid remote control key mapping. */
    configManagerHidkeyMap();
 #endif

    /* don't allocate memory for AT commands if they're not required */
    if (keyLengths->size_at_commands)
    {        
        InitConfigMemoryAtCommands(keyLengths->size_at_commands);
        configManagerAtCommands(keyLengths->size_at_commands + sizeof(config_block3_t) - 1);
    }
    
#ifdef ENABLE_FM
    /* read the fm configuration data */
    configManagerReadFmData();
    
#endif
    /* release the memory used for the lengths key */
    freePanic(keyLengths);
}
void configManagerInit( void )  
{ 
	/* use a memory allocation for the lengths data to reduce stack usage */
    lengths_config_type * keyLengths = mallocPanic(sizeof(lengths_config_type));
	
        /*get the config ID**/    
    uint16 lConfigID = get_config_id ( PSKEY_CONFIGURATION_ID ) ;
	
		/* Read key lengths */
    configManagerKeyLengths(lConfigID, keyLengths);			

        /* Allocate the memory required for the configuration data */
    InitConfigMemory_1(keyLengths);
    
  	    /* Read and configure the button durations */
  	configManagerButtonDurations(lConfigID );

#ifndef T3ProductionTest	
  	    /* Read the system event configuration and configure the buttons */
    configManagerButtons(lConfigID );
#endif

    /*configures the pattern button events*/
    configManagerButtonPatterns(lConfigID ) ;

        /*Read and configure the event tones*/
    configManagerEventTones( lConfigID, keyLengths->no_tones ) ;
        /* Read and configure the system features */
  	configManagerFeatureBlock( lConfigID );	
        /* Read and configure the user defined tones */    
  	configManagerUserDefinedTones( lConfigID, keyLengths->userTonesLength );	
    
#ifdef ROM_LEDS	
  	    /* Read and configure the LEDs */
    configManagerLEDS(lConfigID);
#endif    
        /* Read and configure the voume settings */
  	configManagerVolume( lConfigID );
 
        /* Read and configure the automatic switch off time*/
    configManagerConfiguration( lConfigID );
 
  	    /* Read and configure the power management system */
  	configManagerPower( lConfigID );
 
  	    /* Read and configure the radio parameters */
  	configManagerRadio( lConfigID );

#ifdef BHC612
       /* Read and configure the volume orientation, LED Disable state, and tts_language */
	configManagerReadSessionData ( lConfigID ) ;
#else
	configManagerReadSessionData ( lConfigID ) ;
#endif

#ifdef T3ProductionTest
	configManagerButtons(lConfigID );
#endif
        /* Read and configure the sniff sub-rate parameters */
	configManagerSetupSsr ( lConfigID ) ; 
	
    configManagerEventTTSPhrases( lConfigID, keyLengths->no_tts ) ;

    configManagerVoicePromptsInit( lConfigID, keyLengths->no_vp , keyLengths->no_tts_languages );
    
    /* release the memory used for the lengths key */
    free(keyLengths);
}