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); }
/* * ======== 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 10-bit Analog to Digital Converter (ADC) */ ADC10_init(); /* initialize Config for the MSP430 USCI_A0 */ USCI_A0_init(); /* initialize Config for the MSP430 A3 Timer0 */ Timer0_A3_init(); /* initialize Config for the MSP430 System Registers */ System_init(); /* initialize Config for the MSP430 A3 Timer0 */ Timer1_A3_init(); /* initialize Config for the MSP430 WDT+ */ WDTplus_init(); }
/* * ======== CSL_init ========= * Initialize all configured CSL peripherals */ void CSL_init(void) { /* initialize Config for the MSP430 WDT+ */ WDTplus_init(); /* 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 USI */ USI_init(); /* initialize Config for the MSP430 A3 Timer0 */ Timer0_A3_init(); /* initialize Config for the MSP430 System Registers */ System_init(); }