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

📄 pub_def.h

📁 FREESCALE 提供的 ZIGBEE协议
💻 H
字号:
/**
 * Copyright (c) 2004, Freescale Semiconductor
 * Freescale Confidential Proprietary
 *
 * File name :  pub_def.h
 * Project name: SMAC (Simple Media Access Controller)
 *
 * Department : Freescale Radio Products Division
 *
 * Description :  Definitions for variable types, transciever modes and 
 * PHY status.
 *
 * $Author: a19259 $
 * $Date: 2005/07/29 02:27:50 $
 * $Name:  $
 */

#ifndef __PUB_DEFINE__
#define __PUB_DEFINE__

/*
 * Standard Definitions:
 * These defines allow for easier porting to other compilers. if porting change
 * these defines to the required values for the chosen compiler.
 */

typedef unsigned char   UINT8;      /*unsigned 8 bit definition */
typedef unsigned int    UINT16;     /*unsigned 16 bit definition*/
typedef unsigned long   UINT32;     /*unsigned 32 bit definition*/
typedef signed char     INT8;       /*signed 8 bit definition */
typedef short           INT16;      /*signed 16 bit definition*/
typedef long int        INT32;      /*signed 32 bit definition*/


/* Modes defined for the transciever */
#define IDLE_MODE               0x00
#define RX_MODE                 0x02
#define TX_MODE                 0x03
#define PULSE_TX_MODE           0x43
#define CCA_MODE                0x01
#define RX_MODE_WTO             0x80
#define HIBERNATE_MODE          0x81
#define DOZE_MODE               0x82
#define IDLE_MODE_DOZE          0x83
#define IDLE_MODE_ATTN          0x84
#define TIMEOUT                 0x85
#define SYSTEM_RESET_MODE       0x86    /* Not implemented */
#define MC13192_RESET_MODE      0x87    /* Not implemented */
#define MC13192_CONFIG_MODE     0x88    /* Not implemented */
#define RESET_DELAY             0x89    /* Set to 100ms    */

/* Test modes defined for the transciever */
#define PULSE_TX_PRBS9            0x01
#define FORCE_IDLE                0x02
#define CONTINUOUS_RX            0x03
#define CONTINUOUS_TX_MOD       0x04
#define CONTINUOUS_TX_NOMOD        0x05

#define TRUE    1
#define FALSE   0

#define MAXPACKETSIZE   126

#define MAX_POWER       100     /* Numbers chosen arbitrarily but > 16 */
#define NOMINAL_POWER   0x0B
#define MIN_POWER       50      /* Numbers chosen arbitrarily but > 16 */

/* Status enumations for the PHY. */
#define SUCCESS         0x77
#define INITIAL_VALUE   0x0
enum PD_DATA_STATUS {RX_ON = 1, TRX_OFF};
enum MC13192_POWER_MODES {RF_POWER_ON = 1, RF_POWER_HIBERNATE, RF_POWER_DOZE};
enum PLME_SET_TRX_STATE_REQUEST {ERROR = 1};
#define OVERFLOW    1

typedef struct {
    UINT8 u8MaxDataLength;
    UINT8 u8DataLength;
    UINT8 *pu8Data;
    UINT8 u8Status;
} tRxPacket;

typedef struct {
    UINT8 u8DataLength;
    UINT8 *pu8Data;
} tTxPacket;

typedef struct {    
    UINT8 u8CCAMode;
    UINT8 u8InstantValue;
    UINT8 u8FinalValue;    
} tCCAMeasurement;

#ifndef NULL
    #define NULL    ((void *)0)
#endif

#endif

⌨️ 快捷键说明

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