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

📄 sci_receiver.h

📁 基于Freescale-smac的点对点通讯。 简介:在Router(特征:接口为COM口)上实现点对点通信。 子工程: 1、接收端receiver_13213_ver2.0 (目前只
💻 H
字号:
/* File     : sci_receiver.h
 * Author   : Li Lan
 * Date     : June 6th, 2007
 * Abstract : The head file of sci_receiver.c (for 13213-NCB)
 * 
 **********************************************************************/
#ifndef SCI_RECEIVER_H
#define SCI_RECEIVER_H
 
#include "device_header.h"
#include "pub_def.h"

/* define value for switches when up (not pressed) and down (pressed) */
#define SW_UP 1
#define SW_DOWN 0

/* define internal pull-up */
#define PULL_UP_ON 1
#define PULL_UP_OFF 0

/* SW1 on schematic */
#define SW1 PTAD_PTAD2
#define SW1PU PTAPE_PTAPE2
#define SW1DIR PTADD_PTADD2
#define SW1IE KBI1PE_KBI1PE2
  
/* SW2 on schematic */
#define SW2 PTAD_PTAD3
#define SW2PU PTAPE_PTAPE3
#define SW2DIR PTADD_PTADD3
#define SW2IE KBI1PE_KBI1PE3
   
/* SW3 on schematic */
#define SW3 PTAD_PTAD4
#define SW3PU PTAPE_PTAPE4
#define SW3DIR PTADD_PTADD4
#define SW3IE KBI1PE_KBI1PE4
  
/* SW4 on schematic */
#define SW4 PTAD_PTAD5
#define SW4PU PTAPE_PTAPE5
#define SW4DIR PTADD_PTADD5
#define SW4IE KBI1PE_KBI1PE5


#define LOW_POWER_WHILE() _asm wait

/* define the state of gi8AppStatus */
#define INITIAL_STATE 0
#define IDLE_STATE 1
#define WAITING_FOR_ACK 2
#define RECEIVER_ALWAYS_ON 3
#define TRANSMIT_ACK 4
#define TRANSMIT_DATA 5
#define TIMEOUT_STATE 6

/* define the delay time */
#define QUARTER_SEC 0x3D08  //0.25sec
#define HALF_SECOND 0x7A10  //0.5sec
#define ONE_SECOND 0xF420   //1 sec


/**************************************************************
*    Prototypes
**************************************************************/
UINT16 MCUReadTmr1(void);
void MCUDelay (UINT16);
void MCPSDataIndication(tRxPacket *);
void MLMEMC13192ResetIndication (void);

// the functions that control the LEDs
void LEDSInit(void);
void LED_DS2_ON(void);
void LED_DS3_ON(void);
void LED_DS2_OFF(void);
void LED_DS3_OFF(void);

#endif

⌨️ 快捷键说明

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