We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在uart1_timer1_tx.c文件中原外部变量引入:
extern __CODE uint16_t ticks_ms; extern __CODE uint8_t ticks_us, clkdiv;
需要如下修改: ` #if defined (SDCC) || defined (__SDCC) extern __CODE uint16_t ticks_ms; extern __CODE uint8_t ticks_us; //clkdiv (include fw_reg_stc8h.h) #elif defined CX51 extern uint16_t code ticks_ms; extern uint8_t code ticks_us; #endif
……
UART1_TxHex(CLKDIV);//改成大写
在fw_sys.c文件中调整如下: #if defined (SDCC) || defined (__SDCC) __CODE uint16_t ticks_ms = (__CONF_FOSC / ((__CONF_CLKDIV == 0)? 1 : __CONF_CLKDIV) / __CLK_REF); __CODE uint8_t ticks_us = (__CONF_FOSC / ((__CONF_CLKDIV == 0)? 1 : __CONF_CLKDIV) / __CLK_REF / 1000); #elif defined CX51 uint16_t code ticks_ms = (__CONF_FOSC / ((__CONF_CLKDIV == 0)? 1 : __CONF_CLKDIV) / __CLK_REF); uint8_t code ticks_us = (__CONF_FOSC / ((__CONF_CLKDIV == 0)? 1 : __CONF_CLKDIV) / __CLK_REF / 1000); #endif `
在
文件中调整如下:
The text was updated successfully, but these errors were encountered:
Thank you for the report. The code should work as __CODE macro will be translated to code in __CX51__, which is defined in fw_reg_base.h
__CODE
code
__CX51__
#elif defined __CX51__ ... #define __CODE code #define __REENTRANT reentrant
I will test it in Keil C51 later.
Sorry, something went wrong.
The commit e2024f5 has fixed this issue.
No branches or pull requests
在uart1_timer1_tx.c文件中原外部变量引入:
extern __CODE uint16_t ticks_ms; extern __CODE uint8_t ticks_us, clkdiv;
需要如下修改:
`
#if defined (SDCC) || defined (__SDCC)
extern __CODE uint16_t ticks_ms;
extern __CODE uint8_t ticks_us; //clkdiv (include fw_reg_stc8h.h)
#elif defined CX51
extern uint16_t code ticks_ms;
extern uint8_t code ticks_us;
#endif
……
UART1_TxHex(CLKDIV);//改成大写
在
fw_sys.c文件中调整如下:
#if defined (SDCC) || defined (__SDCC)
__CODE uint16_t ticks_ms = (__CONF_FOSC / ((__CONF_CLKDIV == 0)? 1 : __CONF_CLKDIV) / __CLK_REF);
__CODE uint8_t ticks_us = (__CONF_FOSC / ((__CONF_CLKDIV == 0)? 1 : __CONF_CLKDIV) / __CLK_REF / 1000);
#elif defined CX51
uint16_t code ticks_ms = (__CONF_FOSC / ((__CONF_CLKDIV == 0)? 1 : __CONF_CLKDIV) / __CLK_REF);
uint8_t code ticks_us = (__CONF_FOSC / ((__CONF_CLKDIV == 0)? 1 : __CONF_CLKDIV) / __CLK_REF / 1000);
#endif
`
The text was updated successfully, but these errors were encountered: