2022-03-29 02:30 AM
I created a new TouchGFX application, opened it with Visual Studio 2022.
The application compiles and runs.
I have Screen1View.hpp file, when I can add a field of type uint32_t, Visual Studio has no problem with that. Then I open Model.hpp file, I try to do the same and it doesn't work.
I'm pretty new to that think, I know "uint32_t" is a custom type defined somewhere in the project, but how exactly is it made available in view and not available in model? Should I include some extra header files, and if so, which ones and how could I solve similar problems in the future?
UPDATE:
Oh, forget it, I tried to press Ctrl+., and VS suggested adding `#include <cstdint>`, now it works.
2022-03-29 06:10 AM
In C++, #include <cstdint> to provide the definition for uint32_t.
In C, #include <stdint.h> to do the same.
The latter is included in your chip-specific CMSIS header file (e.g. stm32f429xx.h) which you should typically be including as a header in your code.