⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 evbconfig.h

📁 Filename: hal.h Target: cc2430 Author: EFU/ KJA Revised: 16/12-2005 Revision: 1.0 Description
💻 H
字号:
/*
  V0.1 Initial Release   10/July/2006  RBR
  Port over Tmote        21/December/2006 RS
*/

#ifndef EVBCONFIG_H
#define EVBCONFIG_H

//todo: figure it out...dynamic memory allocation
//change these locations for different PIC18 Processors
//these segments are for the 4620
//#define HEAPSEGMENT 0x100
//#define NEIGHBORSEGMENT 0xB00

//other macros
#define NOP()               _NOP()#define RESET()             _RESET()
#define DISABLE_WDT()       (WDTCTL = (WDTPW | WDTHOLD))
#define FOSC 4000000    //internal clock frequency...MCLK for CPU...see DCO setting

/*
 * Leds configuration for the TMote Sky.
 */
#define led_red_on()        P5OUT &= ~(1<<(4))
#define led_green_on()      P5OUT &= ~(1<<(5))
#define led_blue_on()     P5OUT &= ~(1<<(6))
#define led_red_off()       P5OUT |= (1<<(4))
#define led_green_off()     P5OUT |= (1<<(5))
#define led_blue_off()    P5OUT |= (1<<(6))
#define led_red_toggle()    P5OUT ^= (1 << 4)
#define led_green_toggle()  P5OUT ^= (1 << 5)
#define led_blue_toggle() P5OUT ^= (1 << 6)
#define led_red_state()     ((P5OUT & (1<<(4))) ? FALSE : TRUE )
#define led_green_state()   ((P5OUT & (1<<(5))) ? FALSE : TRUE )
#define led_blue_state()  ((P5OUT & (1<<(6))) ? FALSE : TRUE )
#define led_init()     {  P5SEL &= 0xFF8F; P5DIR |= 0x0070; led_green_off(); led_red_off(); led_blue_off(); }

#define LED_CONFIG()\
{					\
  led_init(); 		\
}                    

#endif

⌨️ 快捷键说明

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