- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
The following line of code results in a warning when compiled. I followed the EEPROM setup from an applications note I found on your website. The EEPROM is working fine. However, I'd like to resolve the warning. I'm using a PSOC CY8C4247AZI-M485 4200M. Main.c is attached.
returnValue = EEPROM_1_Init(&emEeprom[0]);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The function EEPROM_1_Init() is defined in EEPROM_1.c as
cy_en_em_eeprom_status_t EEPROM_1_Init(uint32 startAddress)
So the argument needs to be "uint32" to avoid warning.
I made a simple test project and tested
(1) same argument with you, and yes received the warning
(2) I cast the address as "uint32" and the warning is gone.
But please note that using cast we can fool the compiler even with wrong argument,
so make sure that what you are doing is correct.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The function EEPROM_1_Init() is defined in EEPROM_1.c as
cy_en_em_eeprom_status_t EEPROM_1_Init(uint32 startAddress)
So the argument needs to be "uint32" to avoid warning.
I made a simple test project and tested
(1) same argument with you, and yes received the warning
(2) I cast the address as "uint32" and the warning is gone.
But please note that using cast we can fool the compiler even with wrong argument,
so make sure that what you are doing is correct.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Moto
This worked well.