int main() { //initialization code TX_Start(); CyGlobalIntEnable; char str[10]; char strdouble[10]; float sum = sum_float(donothing_float, 1, 1000); double sum_d = sum_float(donothing_float, 1, 1000); sprintf(str, "%f", sum); sprintf(strdouble, "%f", sum_d); TX_PutString(str); TX_PutCRLF(); while (1) { sprintf(str, "%d", (int)Timer_1_ReadCounter()); TX_PutString(str); TX_PutCRLF(); CyDelay(10); } }
int main() { float f = sum_float(1, 2); double d = sum_double(1, 2); return f == d; }