Is there any predefined macro to check if variable is writable in run-time?
Posted: Thu Mar 07, 2019 11:55 am
Hello,
I'm quite new to esp32. Esp-idf proved so far to be very good library, also documentation is very good.
I'm porting some existing code to esp32 DK and got to exceptions where I try to write to variables that are declared as 'const'. While that for some reason worked on other platform, it of course raises exception in esp32.
I'd like to have portable code, so I'd like to check this in run-time.
I can of course write my own checks, but my question is, is there any predefined macro or other method available already available to find out in run-time, if particular item is writable?
Thank you and best regards,
Borut.
I'm quite new to esp32. Esp-idf proved so far to be very good library, also documentation is very good.
I'm porting some existing code to esp32 DK and got to exceptions where I try to write to variables that are declared as 'const'. While that for some reason worked on other platform, it of course raises exception in esp32.
I'd like to have portable code, so I'd like to check this in run-time.
I can of course write my own checks, but my question is, is there any predefined macro or other method available already available to find out in run-time, if particular item is writable?
Thank you and best regards,
Borut.