Esempio n. 1
0
void inicia(void)
{
  
    system_init();
    USCI_B0_init();
    USCI_A0_init();
    GPIO_init();
    Timer0_A3_init();
    
        /* 
     * IFG2, Interrupt Flag Register 2
     * 
     * UCB0TXIFG -- Interrupt pending
     * UCB0RXIFG -- Interrupt pending
     * ~UCA0TXIFG -- No interrupt pending
     * ~UCA0RXIFG -- No interrupt pending
     * 
     * Note: ~<BIT> indicates that <BIT> has value zero
     */
    IFG2 &= ~(UCB0TXIFG + UCB0RXIFG);

    /* 
     * IE2, Interrupt Enable Register 2
     * 
     * UCB0TXIE -- Interrupt enabled
     * UCB0RXIE -- Interrupt enabled
     * ~UCA0TXIE -- Interrupt disabled
     * ~UCA0RXIE -- Interrupt disabled
     * 
     * Note: ~<BIT> indicates that <BIT> has value zero
     */
    IE2 &= ~(UCB0TXIE + UCB0RXIE);

}
Esempio n. 2
0
/*
 *  ======== CSL_init =========
 *  Initialize all configured CSL peripherals
 */
void CSL_init(void)
{
    /* Stop watchdog timer from timing out during initial start-up. */
    WDTCTL = WDTPW + WDTHOLD;

    /* initialize Config for the MSP430 GPIO */
    GPIO_init();

    /* initialize Config for the MSP430 2xx family clock systems (BCS) */
    BCSplus_init();

    /* initialize Config for the MSP430 USCI_B0 */
    USCI_B0_init();

    /* initialize Config for the MSP430 A3 Timer */
    Timer_A3_init();

    /* initialize Config for the MSP430 System Registers */
    System_init();

    /* initialize Config for the MSP430 WDT+ */
    WDTplus_init();

}