Suite3.4.7和Keil u3自带fx2.h、fx2regs.h文件的异同

C:\Keil\C51\INC\Cypress

D:\Cypress\Cypress Suite USB 3.4.7\Firmware\inc

   

1、发现Suite3.4.7文件夹里面的FX2.h文件和Keil内部携带的FX2.h文件匹配(一样).

   

2、两个fx2regs.h文件不匹配, Suite3.4.7自带的版本比Keil u3所带版本新。

   

2.1、Suite自带版本对自动指针1的命名(较长)不同于Keil的(较短),但是已经做好了向下兼容的处理。兼容处理如下:

#define AUTOPTR1H AUTOPTRH1 // for backwards compatibility with examples

#define AUTOPTR1L AUTOPTRL1 // for backwards compatibility with examples

#define APTR1H AUTOPTRH1 // for backwards compatibility with examples

#define APTR1L AUTOPTRL1 // for backwards compatibility with examples

   

2.2、Suite3.4.7自带的fx2regs.h对IO端口的每一位进行了定义,Keil自带版本并没有。IO端口位定义如下:

sfr IOA = 0x80;

/* IOA */

sbit PA0 = 0x80 + 0;

sbit PA1 = 0x80 + 1;

sbit PA2 = 0x80 + 2;

sbit PA3 = 0x80 + 3;

   

sbit PA4 = 0x80 + 4;

sbit PA5 = 0x80 + 5;

sbit PA6 = 0x80 + 6;

sbit PA7 = 0x80 + 7;

posted on 2014-08-23 15:38  Module_Sun  阅读(263)  评论(0编辑  收藏  举报

导航