本帖最后由 ZG11211 于 2013-10-6 22:24 编辑
由于网上的库文件都没有针对64脚封装的M058SS的库文件,所以就没有P5口和P6口的寄存器地址声明,也就没办法使用这两组IO口,我参考PFD文档,加入了这些资料,高手请无视,呵呵。
只要将以下的复制粘贴到原 M051.H里面即可,个别的可能只能仅供参考,因为我现在已经将原带的库丢垃圾桶了。
改的原因:我需要直接将一排针脚位做12864液晶的端口,最少要用到VCC,GND,RS_A0,SCLK,DATA,RES这6个脚。无奈上下4排针脚位里面都不可避免的使用到P5或P6的IO口,按原资料的库文件,没办法将P5或P6设定成输出模式(库里面只有P0·~P4)
#define P5_PMD (*((volatile unsigned long *) (GP_BA+0x000002C0)))
#define P5_OFFD (*((volatile unsigned long *) (GP_BA+0x000002C4)))
#define P5_DOUT (*((volatile unsigned long *) (GP_BA+0x000002C8)))
#define P5_DMASK (*((volatile unsigned long *) (GP_BA+0x000002CC)))
#define P5_PIN (*((volatile unsigned long *) (GP_BA+0x000002D0)))
#define P5_DBEN (*((volatile unsigned long *) (GP_BA+0x000002D4)))
#define P5_IMD (*((volatile unsigned long *) (GP_BA+0x000002D8)))
#define P5_IEN (*((volatile unsigned long *) (GP_BA+0x000002DC)))
#define P5_ISRC (*((volatile unsigned long *) (GP_BA+0x000002E0)))
#define P6_PMD (*((volatile unsigned long *) (GP_BA+0x00000300)))
#define P6_OFFD (*((volatile unsigned long *) (GP_BA+0x00000304)))
#define P6_DOUT (*((volatile unsigned long *) (GP_BA+0x00000308)))
#define P6_DMASK (*((volatile unsigned long *) (GP_BA+0x0000030C)))
#define P6_PIN (*((volatile unsigned long *) (GP_BA+0x00000310)))
#define P6_DBEN (*((volatile unsigned long *) (GP_BA+0x00000314)))
#define P6_IMD (*((volatile unsigned long *) (GP_BA+0x00000318)))
#define P6_IEN (*((volatile unsigned long *) (GP_BA+0x0000031C)))
#define P6_ISRC (*((volatile unsigned long *) (GP_BA+0x00000320)))
#define P7_PMD (*((volatile unsigned long *) (GP_BA+0x00000340)))
#define P7_OFFD (*((volatile unsigned long *) (GP_BA+0x00000344)))
#define P7_DOUT (*((volatile unsigned long *) (GP_BA+0x00000348)))
#define P7_DMASK (*((volatile unsigned long *) (GP_BA+0x0000034C)))
#define P7_PIN (*((volatile unsigned long *) (GP_BA+0x00000350)))
#define P7_DBEN (*((volatile unsigned long *) (GP_BA+0x00000354)))
#define P7_IMD (*((volatile unsigned long *) (GP_BA+0x00000358)))
#define P7_IEN (*((volatile unsigned long *) (GP_BA+0x0000035C)))
#define P7_ISRC (*((volatile unsigned long *) (GP_BA+0x00000360)))
#define P50_DOUT (*((volatile unsigned long *) (GP_BA+0x00000380)))
#define P51_DOUT (*((volatile unsigned long *) (GP_BA+0x00000384)))
#define P52_DOUT (*((volatile unsigned long *) (GP_BA+0x00000388)))
#define P53_DOUT (*((volatile unsigned long *) (GP_BA+0x0000038C)))
#define P54_DOUT (*((volatile unsigned long *) (GP_BA+0x00000390)))
#define P55_DOUT (*((volatile unsigned long *) (GP_BA+0x00000394)))
#define P56_DOUT (*((volatile unsigned long *) (GP_BA+0x00000398)))
#define P57_DOUT (*((volatile unsigned long *) (GP_BA+0x0000039C)))
#define P60_DOUT (*((volatile unsigned long *) (GP_BA+0x000003A0)))
#define P61_DOUT (*((volatile unsigned long *) (GP_BA+0x000003A4)))
#define P62_DOUT (*((volatile unsigned long *) (GP_BA+0x000003A8)))
#define P63_DOUT (*((volatile unsigned long *) (GP_BA+0x000003AC)))
#define P64_DOUT (*((volatile unsigned long *) (GP_BA+0x000003B0)))
#define P65_DOUT (*((volatile unsigned long *) (GP_BA+0x000003B4)))
#define P66_DOUT (*((volatile unsigned long *) (GP_BA+0x000003B8)))
#define P67_DOUT (*((volatile unsigned long *) (GP_BA+0x000003BC)))
#define P70_DOUT (*((volatile unsigned long *) (GP_BA+0x000003C0)))
#define P71_DOUT (*((volatile unsigned long *) (GP_BA+0x000003C4)))
|