示例#1
0
文件: main.c 项目: oter/BSPTools
//****************************************************************************
//
//! Disable the LED blinking Timer as Device is connected to AP
//!
//! \param none
//!
//! return none
//
//****************************************************************************
void LedTimerDeinitStop()
{
    //
    // Disable the LED blinking Timer as Device is connected to AP
    //
    Timer_IF_Stop(TIMERA0_BASE,TIMER_A);
    Timer_IF_DeInit(TIMERA0_BASE,TIMER_A);

}
示例#2
0
//*****************************************************************************
//
//! The interrupt handler for the first timer interrupt.
//!
//! \param  None
//!
//! \return none
//
//*****************************************************************************
void
TimerBaseIntHandler(void)
{
    //
    // Clear the timer interrupt.
    //
    Timer_IF_InterruptClear(g_ulBase);

    g_ulTimerInts ++;
	g_ulSeconds ++;

	Timer_IF_Stop(g_ulBase,TIMERA0_BASE);

	Timer_IF_Start(g_ulBase, TIMER_A, 1000);
}
示例#3
0
//****************************************************************************
//
//! Implements Sleep followed by wakeup using GPT timeout
//!
//! \param none
//!
//! This function
//!    1. Implements Sleep followed by wakeup using GPT
//!
//! \return None.
//
//****************************************************************************
void PerformPRCMSleepGPTWakeup()
{
    //
    // Power On the GPT along with sleep clock
    //
    MAP_PRCMPeripheralClkEnable(PRCM_TIMERA0, PRCM_RUN_MODE_CLK);

    //
    // Initialize the GPT as One Shot timer
    //
    Timer_IF_Init(PRCM_TIMERA0, TIMERA0_BASE, TIMER_CFG_ONE_SHOT, TIMER_BOTH, 0);
    Timer_IF_IntSetup(TIMERA0_BASE, TIMER_BOTH, AppGPTCallBackHandler);

    //
    // Start timer with value in mSec
    //
    Timer_IF_Start(TIMERA0_BASE, TIMER_BOTH, 4000);

    //
    // Enable the Sleep Clock
    //
    MAP_PRCMPeripheralClkEnable(PRCM_TIMERA0, PRCM_SLP_MODE_CLK);

    //
    // Enter SLEEP...WaitForInterrupt ARM intrinsic
    //
    DBG_PRINT("GPT_SLEEP: Entering Sleep\n\r");
    MAP_UtilsDelay(80000);
    MAP_PRCMSleepEnter();
    DBG_PRINT("GPT_SLEEP: Exiting Sleep\n\r");

    //
    // Disable the Sleep Clock
    //
    MAP_PRCMPeripheralClkDisable(PRCM_TIMERA0, PRCM_SLP_MODE_CLK);

    //
    // Deinitialize the GPT
    //
    Timer_IF_Stop(TIMERA0_BASE, TIMER_BOTH);
    Timer_IF_DeInit(TIMERA0_BASE, TIMER_BOTH);

    //
    // PowerOff GPT
    //
    MAP_PRCMPeripheralClkDisable(PRCM_TIMERA0, PRCM_RUN_MODE_CLK);
}