使用CCS5.2 打开 controlSUITE 的工程时, 编译一次, 就可以使用 F3 快捷键来打开函数和变量的定义出. 可以查看很多源代码.
===============================================================================================================================
/*
* ======== CSL_init.c ========
* DO NOT MODIFY THIS FILE - CHANGES WILL BE OVERWRITTEN
*/
/* external peripheral initialization functions */
extern void GPIO_init(void);
extern void BCSplus_init(void);
extern void USCI_B0_init(void);
extern void USCI_A0_init(void);
extern void System_init(void);
extern void WDTplus_init(void);
#include <msp430.h>
/*
* ======== 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 USCI_A0 */
USCI_A0_init();
/* initialize Config for the MSP430 System Registers */
System_init();
/* initialize Config for the MSP430 WDT+ */
WDTplus_init();
}
/*
* ======== Interrupt Function Definitions ========
*/
/* --COPYRIGHT--,EPL
* Copyright (c) 2010 Texas Instruments and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Texas Instruments - initial implementation
*
* --/COPYRIGHT--*/
/* Interrupt Function Prototypes */
extern void USCIAB0RX_ISR(void);
extern void USCIAB0TX_ISR(void);
extern void USCIAB0RX_ISR(void);
extern void USCIAB0RX_ISR(void);
/*
* ======== USCI A0/B0 TX Interrupt Handler Generation ========
*/
#pragma vector=USCIAB0TX_VECTOR
__interrupt void USCI0TX_ISR_HOOK(void)
{
/* USCI_B0 Transmit Interrupt Handler */
USCIAB0TX_ISR();
/* No change in operating mode on exit */
}
/*
* ======== USCI A0/B0 RX Interrupt Handler Generation ========
*/
#pragma vector=USCIAB0RX_VECTOR
__interrupt void USCI0RX_ISR_HOOK(void)
{
if (IFG2 & UCA0RXIFG) {
/* USCI_A0 Receive Interrupt Handler */
USCIAB0RX_ISR();
/* No change in operating mode on exit */
}
else if (UCB0STAT & UCSTTIFG) {
/* USCI_B0 I2C Start Condition Interrupt Handler */
USCIAB0RX_ISR();
/* No change in operating mode on exit */
}
else if (UCB0STAT & UCSTPIFG) {
/* USCI_B0 I2C Stop Condition Interrupt Handler */
USCIAB0RX_ISR();
/* No change in operating mode on exit */
}
}