Beispiel #1
0
/*******************************************************************************
* Function Name: Mixer_1_Wakeup
********************************************************************************
*
* Summary:
*  Enables block's operation and restores its configuration. Should be called
*  just after awaking from sleep.
*  
* Parameters:  
*  None
*
* Return: 
*  void
*
* Global variables:
*  Mixer_1_backup:  The structure field 'enableState' is used to 
*  restore the enable state of block after wakeup from sleep mode.
*
*******************************************************************************/
void Mixer_1_Wakeup(void) 
{
    /* Restore the user configuration */
    Mixer_1_RestoreConfig();
    
    /* Enable's the component operation */
    if(Mixer_1_backup.enableState == Mixer_1_ENABLED)
    {
        Mixer_1_Enable();
    } /* Do nothing if component was disable before */
}
Beispiel #2
0
/*******************************************************************************
* Function Name: Mixer_1_Start
********************************************************************************
*
* Summary:
*  The start function initializes the SC block control registers based on the
*  Mixer type selected and and enables power to the SC block
*
* Parameters:  
*  void
*
* Return: 
*  void 
*
* Global variables:
*  Mixer_1_initVar:  Used to check the initial configuration,
*  modified when this function is called for the first time.
*
* Theory: 
*  Full initialization of the SC Block configuration registers is only perfomed 
*  the first time the routine executes - global variable 
*  Mixer_1_initVar is used indicate that the static configuration has 
*  been completed.
*
*******************************************************************************/
void Mixer_1_Start(void) 
{
    /* If not Initialized then initialize all required hardware and software */
    if(Mixer_1_initVar == 0u)
    {
        Mixer_1_Init();
        Mixer_1_initVar = 1u;
    }
    /* Enable the power to the block */
    Mixer_1_Enable();
    
}