/*..........................................................................*/ void QV_onIdle(void) { /* NOTE: called with interrutps DISABLED, see NOTE1 */ /* toggle LED2 on and then off, see NOTE2 */ P1OUT |= LED2; /* turn LED2 on */ P1OUT &= ~LED2; /* turn LED2 off */ #ifdef Q_SPY QF_INT_ENABLE(); if (((IFG2 & UCA0TXIFG)) != 0U) { /* UART not transmitting? */ uint16_t b; QF_INT_DISABLE(); b = QS_getByte(); QF_INT_ENABLE(); if (b != QS_EOD) { UCA0TXBUF = (uint8_t)b; /* stick the byte to the TX BUF */ } } #elif defined NDEBUG /* Put the CPU and peripherals to the low-power mode. * you might need to customize the clock management for your application, * see the datasheet for your particular MSP430 MCU. */ __low_power_mode_1(); /* Enter LPM1; also ENABLES interrupts */ #else QF_INT_ENABLE(); /* just enable interrupts */ #endif }
/*..........................................................................*/ void QK_onIdle(void) { LED1_on(); /* switch LED1 on and off */ LED1_off(); #ifdef NDEBUG __low_power_mode_1(); /* Enter LPM1 */ #endif }
void HalBoardDelay(uint16 delay, uint8 sleep) { halBrdTmrDly = halBrdTmrTick + delay + 1; halBrdTmrDlyF = TRUE; if (sleep) { halBrdDlySleep = TRUE; } __low_power_mode_1(); halBrdDlySleep = FALSE; }
/*..........................................................................*/ void QV_onIdle(void) { /* NOTE: called with interrutps DISABLED, see NOTE1 */ /* toggle LED2 on and then off, see NOTE2 */ P4OUT |= LED2; /* turn LED2 on */ P4OUT &= ~LED2; /* turn LED2 off */ #ifdef NDEBUG /* Put the CPU and peripherals to the low-power mode. * you might need to customize the clock management for your application, * see the datasheet for your particular MSP430 MCU. */ __low_power_mode_1(); /* Enter LPM1; also ENABLES interrupts */ #else QF_INT_ENABLE(); /* just enable interrupts */ #endif }
//............................................................................ void QV::onIdle(void) { // NOTE: called with interrutps DISABLED, see NOTE1 // toggle LED2 on and then off, see NOTE2 P1OUT |= LED2; // turn LED2 on P1OUT &= ~LED2; // turn LED2 off #ifdef NDEBUG // Put the CPU and peripherals to the low-power mode. // you might need to customize the clock management for your application, // see the datasheet for your particular MSP430 MCU. // __low_power_mode_1(); // Enter LPM1; also ENABLES interrupts #else QF_INT_ENABLE(); // just enable interrupts #endif }
/*..........................................................................*/ void QK_onIdle(void) { #ifdef Q_SPY if (((IFG2 & UCA0TXIFG)) != 0) { uint16_t b; QF_INT_DISABLE(); b = QS_getByte(); QF_INT_ENABLE(); if (b != QS_EOD) { UCA0TXBUF = (uint8_t)b; /* stick the byte to the TX BUF */ } } #elif defined NDEBUG __low_power_mode_1(); /* Enter LPM1; also UNLOCKS interrupts */ #endif }
/*..........................................................................*/ void QF_onIdle(void) { /* invoked with interrupts DISABLED */ LED1_on(); /* switch LED1 on and off */ LED1_off(); #ifdef Q_SPY if (((IFG2 & UCA0TXIFG)) != 0) { uint16_t b = QS_getByte(); QF_INT_ENABLE(); if (b != QS_EOD) { UCA0TXBUF = (uint8_t)b; /* stick the byte to the TX BUF */ } } else { QF_INT_ENABLE(); } #elif defined NDEBUG __low_power_mode_1(); /* Enter LPM1 and ENABLE interrupts atomically */ #else QF_INT_ENABLE(); #endif }