From cff99e325f2b0529910be09ff8c1a7c83d5e823c Mon Sep 17 00:00:00 2001 From: IOsetting Date: Thu, 6 Jan 2022 07:59:31 +0800 Subject: [PATCH] fix: pdata macro --- include/fw_reg_base.h | 3 +++ include/fw_reg_stc8g.h | 5 +++-- include/fw_reg_stc8h.h | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/fw_reg_base.h b/include/fw_reg_base.h index 51fd46b..463bc0d 100644 --- a/include/fw_reg_base.h +++ b/include/fw_reg_base.h @@ -19,6 +19,7 @@ #define __BIT __bit #define __IDATA __idata + #define __PDATA __pdata #define __XDATA __xdata #define __CODE __code #define SBIT(name, addr, bit) __sbit __at(addr+bit) name @@ -33,6 +34,7 @@ #elif defined __CX51__ #define __BIT bit #define __IDATA idata + #define __PDATA pdata #define __XDATA xdata #define __CODE code #define SBIT(name, addr, bit) sbit name = addr^bit @@ -51,6 +53,7 @@ # warning unrecognized compiler #define __BIT bool #define __IDATA + #define __PDATA #define __XDATA #define __CODE #define SBIT(name, addr, bit) volatile bool name diff --git a/include/fw_reg_stc8g.h b/include/fw_reg_stc8g.h index 1311c8d..ab67942 100644 --- a/include/fw_reg_stc8g.h +++ b/include/fw_reg_stc8g.h @@ -48,8 +48,9 @@ SFR(CCAP2H, 0xFC); SFR(PWMCFG45, 0xFE); SFR(RSTCFG, 0xFF); -//如下特殊功能寄存器位于扩展RAM区域 -//访问这些寄存器,需先将P_SW2的BIT7设置为1,才可正常读写 +/** + * Set B7 of P_SW2 before read/write the following registers +*/ ///////////////////////////////////////////////// //FF00H-FFFFH diff --git a/include/fw_reg_stc8h.h b/include/fw_reg_stc8h.h index 8154fe2..4428987 100644 --- a/include/fw_reg_stc8h.h +++ b/include/fw_reg_stc8h.h @@ -32,8 +32,9 @@ SFR(USBADR, 0xFC); SFR(RSTCFG, 0xFF); -//如下特殊功能寄存器位于扩展RAM区域 -//访问这些寄存器,需先将P_SW2的BIT7设置为1,才可正常读写 +/** + * Set B7 of P_SW2 before read/write the following registers +*/ ///////////////////////////////////////////////// //FF00H-FFFFH