Tool/software:
I discovered a large number of similar definitions like 【#define xx (0x4120 << 8) 】 in the library I was using. The program couldn't run correctly. The final problem I found was that the compiler regarded the macro as 16-bit. The following change to the program made it run normally 【#define xx (0x4120UL << 8) 】.
However, the library uses a large number of such definitions. Changing the library file is very difficult. Could you please explain how to make the compiler treat this constant as a 32-bit value?