Part Number: TMS320F28388D
Good afternoon.
Tell me how you can compare two signed numbers in C language?
int32_t res;
int32_t mass_U300[16];
int32_t norm_u300v = 0x7F68;
uint8_t detection_v (void) {
for (i = column_1; i <= column_4; ++i) {
res = mass_U300[i];
if ( res > norm_u300v ) {
erro_u300v = 0x2; //above normal
} else if (res < ((int32_t)0x303A) ) {
erro_u300v = 0x1; //below normal
} else{
erro_u300u = 0;
}
}
return erro_u300v;
}
the value of mass_U300 changes depending on the execution of the program.
why does the function always return erro_u300v = 0x2 ?
the first condition is always satisfied.