📄 mt.h
字号:
/******************************************************************************
* Mt.h
*
* Copyright 1994-2006 HolyStone Technology Co.,Ltd.
*
* DESCRIPTION:
*
* modification history
* --------------------
* 01a, 23mar2007, cuiqingwei written
* --------------------
******************************************************************************/
#ifndef _MT_H
#define _MT_H
//-----------------------------------------------------------------------------
// Define constants
//-----------------------------------------------------------------------------
#define BUF_SIZE 32
//Key define
#define ENTER 0x0D
#define BACK_SPACE 0x08
#define ESC 0x1B
//-----------------------------------------------------------------------------
// LED
//
// LED1 = GLED (green)
// LED2 = RLED (red)
// LED3 = YLED (yellow)
// LED4 = BLED (blue)
//
// LED2 and LED4 are not connected to CC2430
//-----------------------------------------------------------------------------
#define LED1 P1_0
#define LED3 P1_3
#define INIT_LED1() do { LED1 = 0; IO_DIR_PORT_PIN(1, 0, IO_OUT); P1SEL &= ~0x01;} while (0)
#define INIT_LED3() do { LED3 = 0; IO_DIR_PORT_PIN(1, 3, IO_OUT); P1SEL &= ~0x08;} while (0)
#define SET_LED1() (LED1 = 1)
#define SET_LED3() (LED3 = 1)
#define CLR_LED1() (LED1 = 0)
#define CLR_LED3() (LED3 = 0)
#define SET_LED_MASK( n ) \
do { \
if ((n) & 0x01) SET_LED1(); else CLR_LED1(); \
if ((n) & 0x04) SET_LED3(); else CLR_LED3(); \
} while (0)
//-----------------------------------------------------------------------------
// Extern Variables
//-----------------------------------------------------------------------------
#endif /* _MT_H */
/*------------------------------------------------------------------------------
0ooo
ooo0 ( )
( ) ) /
\ ( (_/
\_) By:cuiqingwei [gary]
------------------------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -