Skip to content
New issue

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

Messed-up pre-compiler directives in EEPROM library #188

Closed
gztproject opened this issue Aug 22, 2021 · 0 comments · Fixed by #210
Closed

Messed-up pre-compiler directives in EEPROM library #188

gztproject opened this issue Aug 22, 2021 · 0 comments · Fixed by #210

Comments

@gztproject
Copy link

There is a mess with precompiler directives and the library doesn't compile:

#ifndef DEBUGV
#define DEBUGV(...) do { (void)0; } while (0)
#endif
#ifdef __asr650x__
#define _EEPROM_SIZE (CY_FLASH_SIZEOF_ROW * 3)
#define _EEPROM_BASE CY_SFLASH_USERBASE
#else
#define #define _EEPROM_SIZE 0xC00
#define _EEPROM_BASE FLASH_BASE+0x7400
#else

The problem is with the double #define in

#define #define _EEPROM_SIZE 0xC00

and an unclosed #if, instead there is another #else:

What it should probably read:

#ifndef DEBUGV
#define DEBUGV(...) do { (void)0; } while (0)
#endif
#ifdef __asr650x__
#define _EEPROM_SIZE               (CY_FLASH_SIZEOF_ROW * 3)
#define _EEPROM_BASE              CY_SFLASH_USERBASE
#else
#define _EEPROM_SIZE                0xC00
#define _EEPROM_BASE              FLASH_BASE+0x7400
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant