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

📄 patchi2c.h

📁 mpc8xx smc source code:)
💻 H
字号:
/*
 * File:  patchi2c.h
 * Description:  Constants and Definitions for 8XX Simple I2C driver
 *                  using microcode patch to relocate parameters.
 *
 * History
 * 7/18/97    sgj        Initial version.
 *
 */

#ifndef _PATCHI2C_H
#define _PATCHI2C_H

/* ==================== GENERAL CONSTANTS AND DEFINITIONS =============== */

#define TRUE 1
#define FALSE 0

#define ON	1
#define OFF	0

#define MAX(x,y) (((x)>=(y))?(x):(y))
#define MIN(x,y) (((x)<=(y))?(x):(y))

/* ==================== MPC8XX CONSTANTS AND DEFINITIONS =============== */

#define PAGE1_PRAM 0      /* Parameter RAM page 1 index into SCC Param RAM Array */
#define PAGE4_PRAM 3      /* Parameter RAM page 4 index into SCC Param RAM Array */

#define BUFF_MAX_LEN   (0x0100)    /* Maximum length of frame (arbitrary choice) */
 
/* ==================== MPC8XX ADS BOARD CONSTANTS AND DEFINITIONS  =============== */



/* ==================== APPLICATION CONSTANTS AND DEFINITIONS  =============== */

/* Length of Receive and Single Transmit Data Buffers */
#define NUM_RXBDS 1
#define TXBD_INDX (NUM_RXBDS)


/* Local Buffer */
typedef unsigned char LB[BUFF_MAX_LEN+1];  /* Account for Null Terminator */


/*
 * Buffer Descriptor Format
 */

typedef struct BufferDescriptor {
    unsigned short bd_cstatus;     /* control and status */
    unsigned short bd_length;      /* transfer length */
    char* bd_addr;                 /* buffer address */
} BD;

typedef struct CommonBufferDescriptors {
    BD rxbd[NUM_RXBDS];    /* Rx BD */
    BD txbd;               /* Tx BD */
} RTXBD;
  

#endif /* _PATCHI2C_H */

⌨️ 快捷键说明

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