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

📄 moteplatformc.nc

📁 Develop Zigbee network real-time Os
💻 NC
字号:
module MotePlatformC {  provides interface Init;}implementation {  command error_t Init.init() {  atomic  {    P1SEL = 0x00;    P2SEL = 0x00;    P3SEL = 0x00;    P4SEL = 0x00;    P5SEL = 0x00;    // P6SEL = 0x00;    P4OUT = P4IN;  /* This makes the P4x macros show up later */    P4DIR = 0;  /*parport input mode*/    P3DIR &= ~0x3F; /*bus pins input*/    P2DIR |= 0xF0;    P2OUT |= 0xF0; /*module select none*/    P3SEL |= (BIT6|BIT7);    P3DIR |= BIT6;                  /* Use P3.6 as TX */    P3DIR &= ~BIT7;                 /* Use P3.7 as RX */    P5DIR &= ~(BIT2|BIT1);  /* SPI pins are hooked into these on micro.4*/  }    return SUCCESS;  }}

⌨️ 快捷键说明

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