its_board.h

来自「program show the communication of CC100-」· C头文件 代码 · 共 98 行

H
98
字号
/******************************************************************************
    Filename: ITS_board.h

    Copyright 2007 Texas Instruments, Inc.
******************************************************************************/

#ifndef HAL_BOARD_H
#define HAL_BOARD_H

#include "ITS_types.h"
#include "ITS_defs.h"
#include "ITS_digio.h"

#include <io430x14x.h>
#include "in430.h"
#include "ITS_msp430.h"


//----------------------------------------------------------------------------------
//  Easy access, zero overhead LED macros
//  Adapted to hardware interface on MSP430 Experimenter Board
//----------------------------------------------------------------------------------
#define HAL_LED_SET_1   (P1OUT |= BIT1)
//#define HAL_LED_SET_2   (P2OUT |= BIT2)
//#define HAL_LED_SET_4   (P5OUT |= BIT1)

#define HAL_LED_CLR_1   (P1OUT &= ~BIT1)
//#define HAL_LED_CLR_2   (P2OUT &= ~BIT2)
//#define HAL_LED_CLR_4   (P5OUT &= ~BIT1)

#define HAL_LED_TGL_1   (P1OUT ^= BIT1)
//#define HAL_LED_TGL_2   (P2OUT ^= BIT2)
//#define HAL_LED_TGL_4   (P5OUT ^= BIT1)



//----------------------------------------------------------------------------------
//  Port and pin where GDO0 and GDO2 from CC1100/CC2500 are connected
//----------------------------------------------------------------------------------
#define HAL_IO_GDO0_PORT  2
#define HAL_IO_GDO0_PIN   0
#define HAL_IO_GDO2_PORT  1
#define HAL_IO_GDO2_PIN   5


#define HAL_SPI_CS_PORT   3
#define HAL_SPI_CS_PIN    0
#define HAL_SPI_SIMO_PORT 3
#define HAL_SPI_SIMO_PIN  1
#define HAL_SPI_SOMI_PORT 3
#define HAL_SPI_SOMI_PIN  2
#define HAL_SPI_CLK_PORT  3
#define HAL_SPI_CLK_PIN   3

/*
//----------------------------------------------------------------------------------
//  Define ports and pins used by SPI interface to CC1100/CC2500
//----------------------------------------------------------------------------------
#define HAL_SPI_SOMI_PORT 1
#define HAL_SPI_SOMI_PIN  7
#define HAL_SPI_SIMO_PORT 1
#define HAL_SPI_SIMO_PIN  6
#define HAL_SPI_CLK_PORT  2
#define HAL_SPI_CLK_PIN   1
#define HAL_SPI_CS_PORT   1
#define HAL_SPI_CS_PIN    4
*/


#ifdef __cplusplus
extern "C" {
#endif


extern const digioConfig pinLed1;
//extern const digioConfig pinLed2;
//extern const digioConfig pinLed4;
extern const digioConfig pinS1;
extern const digioConfig pinS2;
extern const digioConfig pinGDO0;
extern const digioConfig pinGDO2;



//----------------------------------------------------------------------------------
// Function declarations
//----------------------------------------------------------------------------------

void ITSBoardInit(void);


#ifdef __cplusplus
}
#endif

/**********************************************************************************/
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?