20-09-2018, 05:33 AM
Hi
you just have to cast your data. 2 solutions:
Code_1:
Code_2:
you just have to cast your data. 2 solutions:
Code_1:
Code:
// this constrains the use of the define
#define CONST1 ((uint16_t)556U)
uint16_t const MY_var1 = CONST1;
Code_2:
Code:
#define CONST1 556U
uint16_t const MY_var1 = (uint16_t) CONST1;
<t></t>