/* Enters STOP mode. 
The function is used to disable the WakeUp Pin functionality. */
void SysCtlStopModeConfig(unsigned long ulConfig)
/* Enters STOP mode. 
The function is used to disable the WakeUp Pin functionality. */
void SysCtlStopModeConfig(unsigned long ulConfig)
{
    xHWREG(PWR_CR) &= ~(PWR_CR_PDDS | PWR_CR_LPDS);
    xHWREG(PWR_CR) |= (ulConfig & PWR_CR_LPDS);
    xHWREG(NVIC_SYS_CTRL) |= NVIC_SYS_CTRL_SLEEPDEEP;
    if(ulConfig & SYSCTL_STOP_WFI)
    {
        xCPUwfi();
    }
    else
    {
        xCPUwfe();
    }
}